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§
sourcefn summarize(path: <Self as Timestamp>::Summary) -> <T as Timestamp>::Summary
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.