pub struct Sampling<C>(/* private fields */)
where
C: Series;Expand description
Dep position only: “the last value C produced, whenever that was”. Its slot in the frame is
keyed on this type itself — the [carry] behind it is storage, not a cell, the same way an
[Emitter] is.
Buffering’s third sibling, and the point where the other two have a window: that one is a
reach the engine retains, Folding a reach the node retains, this one a single level the
engine carries across every tick the series was silent.
Trait Implementations§
Source§impl<C> Cell for Sampling<C>
impl<C> Cell for Sampling<C>
Source§const NAME: &'static str = C::NAME
const NAME: &'static str = C::NAME
Forwarded, for the same reason Buffering’s is: the graph predicates match dep names against
frame cell names, and a wrapper that renamed its dep would drop out of every one of them. The
carry advances in its source’s own sweep line, so the source is also the edge an observer draws.
type Out<'t> = Option<<<C as Series>::Item as Present>::Val>
Source§const REACH: Horizon = Horizon::Unit
const REACH: Horizon = Horizon::Unit
How far back a consumer naming this in dep position reads. A bare cell is this tick’s batch
and nothing more; the wrappers (
Buffering, Folding) are what state anything else. This
lives on Cell rather than a Dep trait because DepSet is implemented over tuples of
cells, and a blanket impl<C: Cell> Dep for C would conflict with the wrapper impls.Source§const CLOCK: Option<Timeframe> = None
const CLOCK: Option<Timeframe> = None
How often this cell publishes, for a root and for a node whose kernel changes its input’s rate
(
rates.node.declared). None — whenever its inputs do. Some(tf) — over elements whose tf
period has closed, never re-entered while one is in progress (rates.node.whole-elements). Read moreSource§impl<C> Nudge for Sampling<C>
impl<C> Nudge for Sampling<C>
type Scratch = <Sampling<C> as Cell>::Out<'static>
Auto Trait Implementations§
impl<C> Forget for Sampling<C>
impl<C> Freeze for Sampling<C>where
PhantomData<C>: Freeze,
impl<C> RefUnwindSafe for Sampling<C>where
PhantomData<C>: RefUnwindSafe,
impl<C> Send for Sampling<C>where
PhantomData<C>: Send,
impl<C> Sync for Sampling<C>where
PhantomData<C>: Sync,
impl<C> Unpin for Sampling<C>where
PhantomData<C>: Unpin,
impl<C> UnsafeUnpin for Sampling<C>where
PhantomData<C>: UnsafeUnpin,
impl<C> UnwindSafe for Sampling<C>where
PhantomData<C>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more