timely::progress::timestamp

Trait Refines

Source
pub trait Refines<T: Timestamp>: Timestamp {
    // Required methods
    fn to_inner(other: T) -> Self;
    fn to_outer(self) -> T;
    fn summarize(
        path: <Self as Timestamp>::Summary,
    ) -> <T as Timestamp>::Summary;
}
Expand description

Conversion between pointstamp types.

This trait is central to nested scopes, for which the inner timestamp must be related to the outer timestamp. These methods define those relationships.

It would be ideal to use Rust’s From and Into traits, but they seem to be messed up due to coherence: we can’t implement Into because it induces a from implementation we can’t control.

Required Methods§

Source

fn to_inner(other: T) -> Self

Converts the outer timestamp to an inner timestamp.

Source

fn to_outer(self) -> T

Converts the inner timestamp to an outer timestamp.

Source

fn summarize(path: <Self as Timestamp>::Summary) -> <T as Timestamp>::Summary

Summarizes an inner path summary as an outer path summary.

It is crucial for correctness that the result of this summarization’s results_in method is equivalent to |time| path.results_in(time.to_inner()).to_outer(), or at least produces times less or equal to that result.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Refines<()> for i8

Source§

impl Refines<()> for i16

Source§

impl Refines<()> for i32

Source§

impl Refines<()> for i64

Source§

impl Refines<()> for i128

Source§

impl Refines<()> for isize

Source§

impl Refines<()> for u8

Source§

impl Refines<()> for u16

Source§

impl Refines<()> for u32

Source§

impl Refines<()> for u64

Source§

impl Refines<()> for u128

Source§

impl Refines<()> for usize

Source§

impl Refines<()> for Duration

Source§

impl<TOuter: Timestamp, TInner: Timestamp> Refines<TOuter> for (TOuter, TInner)

Source§

fn to_inner(other: TOuter) -> Self

Source§

fn to_outer(self: (TOuter, TInner)) -> TOuter

Source§

fn summarize( path: <Self as Timestamp>::Summary, ) -> <TOuter as Timestamp>::Summary

Implementors§

Source§

impl<T: Timestamp> Refines<T> for T

All types “refine” themselves,

Source§

impl<TOuter: Timestamp, TInner: Timestamp> Refines<TOuter> for Product<TOuter, TInner>