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.

Object Safety§

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>