pub trait LatencyStreamOps<P>where
P: Element + HasLatency,{
// Required methods
fn stamp<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
where S: Stage<P::L> + 'static;
fn stamp_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
where S: Stage<P::L> + 'static;
fn stamp_precise<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
where S: Stage<P::L> + 'static;
fn stamp_precise_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
where S: Stage<P::L> + 'static;
}Expand description
Extension trait adding .stamp::<Stage>() and friends to streams whose
values carry a Latency record.
Required Methods§
Sourcefn stamp<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
fn stamp<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
Wrap this stream in a StampStream for stage S. Each tick writes
GraphState::wall_time (cycle-start snap, one u64 store) into the
stage’s slot before forwarding.
Sourcefn stamp_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
fn stamp_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
Conditional variant of stamp. When enabled is false,
returns self unchanged — no node is inserted into the graph and
there is zero runtime cost. Useful for flipping stamping on/off at
graph-construction time via a config flag.
Sourcefn stamp_precise<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
fn stamp_precise<S>(self: &Rc<Self>) -> Rc<dyn Stream<P>>
Like stamp but uses GraphState::wall_time_precise
(fresh TSC read, ~5-10ns) for intra-cycle resolution.
Sourcefn stamp_precise_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
fn stamp_precise_if<S>(self: &Rc<Self>, enabled: bool) -> Rc<dyn Stream<P>>
Conditional variant of stamp_precise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".