Trait timely::progress::timestamp::PathSummary

source ·
pub trait PathSummary<T>: Clone + 'static + Eq + PartialOrder + Debug + Default {
    // Required methods
    fn results_in(&self, src: &T) -> Option<T>;
    fn followed_by(&self, other: &Self) -> Option<Self>;
}
Expand description

A summary of how a timestamp advances along a timely dataflow path.

Required Methods§

source

fn results_in(&self, src: &T) -> Option<T>

Advances a timestamp according to the timestamp actions on the path.

The path may advance the timestamp sufficiently that it is no longer valid, for example if incrementing fields would result in integer overflow. In this case, results_in should return None.

The feedback operator, apparently the only point where timestamps are actually incremented in computation, uses this method and will drop messages with timestamps that when advanced result in None. Ideally, all other timestamp manipulation should behave similarly.

§Examples
use timely::progress::timestamp::PathSummary;

let timestamp = 3;

let summary1 = 5;
let summary2 = usize::max_value() - 2;

assert_eq!(summary1.results_in(&timestamp), Some(8));
assert_eq!(summary2.results_in(&timestamp), None);
source

fn followed_by(&self, other: &Self) -> Option<Self>

Composes this path summary with another path summary.

It is possible that the two composed paths result in an invalid summary, for example when integer additions overflow. If it is correct that all timestamps moved along these paths would also result in overflow and be discarded, followed_by can return `None. It is very important that this not be used casually, as this does not prevent the actual movement of data.

§Examples
use timely::progress::timestamp::PathSummary;

let summary1 = 5;
let summary2 = usize::max_value() - 3;

assert_eq!(summary1.followed_by(&summary2), None);

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PathSummary<i8> for i8

source§

fn results_in(&self, src: &i8) -> Option<i8>

source§

fn followed_by(&self, other: &i8) -> Option<i8>

source§

impl PathSummary<i16> for i16

source§

fn results_in(&self, src: &i16) -> Option<i16>

source§

fn followed_by(&self, other: &i16) -> Option<i16>

source§

impl PathSummary<i32> for i32

source§

fn results_in(&self, src: &i32) -> Option<i32>

source§

fn followed_by(&self, other: &i32) -> Option<i32>

source§

impl PathSummary<i64> for i64

source§

fn results_in(&self, src: &i64) -> Option<i64>

source§

fn followed_by(&self, other: &i64) -> Option<i64>

source§

impl PathSummary<i128> for i128

source§

fn results_in(&self, src: &i128) -> Option<i128>

source§

fn followed_by(&self, other: &i128) -> Option<i128>

source§

impl PathSummary<isize> for isize

source§

fn results_in(&self, src: &isize) -> Option<isize>

source§

fn followed_by(&self, other: &isize) -> Option<isize>

source§

impl PathSummary<u8> for u8

source§

fn results_in(&self, src: &u8) -> Option<u8>

source§

fn followed_by(&self, other: &u8) -> Option<u8>

source§

impl PathSummary<u16> for u16

source§

fn results_in(&self, src: &u16) -> Option<u16>

source§

fn followed_by(&self, other: &u16) -> Option<u16>

source§

impl PathSummary<u32> for u32

source§

fn results_in(&self, src: &u32) -> Option<u32>

source§

fn followed_by(&self, other: &u32) -> Option<u32>

source§

impl PathSummary<u64> for u64

source§

fn results_in(&self, src: &u64) -> Option<u64>

source§

fn followed_by(&self, other: &u64) -> Option<u64>

source§

impl PathSummary<u128> for u128

source§

fn results_in(&self, src: &u128) -> Option<u128>

source§

fn followed_by(&self, other: &u128) -> Option<u128>

source§

impl PathSummary<()> for ()

source§

fn results_in(&self, _src: &()) -> Option<()>

source§

fn followed_by(&self, _other: &()) -> Option<()>

source§

impl PathSummary<usize> for usize

source§

fn results_in(&self, src: &usize) -> Option<usize>

source§

fn followed_by(&self, other: &usize) -> Option<usize>

source§

impl PathSummary<Duration> for Duration

source§

impl<TOuter: Timestamp, TInner: Timestamp> PathSummary<(TOuter, TInner)> for (TOuter::Summary, TInner::Summary)

source§

fn results_in( &self, (outer, inner): &(TOuter, TInner) ) -> Option<(TOuter, TInner)>

source§

fn followed_by( &self, (outer, inner): &(TOuter::Summary, TInner::Summary) ) -> Option<(TOuter::Summary, TInner::Summary)>

Implementors§

source§

impl<TOuter: Timestamp, TInner: Timestamp> PathSummary<Product<TOuter, TInner>> for Product<TOuter::Summary, TInner::Summary>