pub trait Cell {
type Out<'t>: Copy;
type Gates: Bit = No;
const NAME: &'static str = _;
const REACH: Horizon = Horizon::Unit;
const FOLDED: bool = false;
const RETAINED: bool = false;
const CLOCK: Option<Timeframe> = None;
// Provided method
fn opens(_: Self::Out<'_>) -> bool { ... }
}Expand description
A value slot in the frame. Out<'t>: Copy — references are Copy, so a batch out enters the
frame as &'t [T] and heavy root/node state is lent as &'t State.
Provided Associated Constants§
Sourceconst NAME: &'static str = _
const NAME: &'static str = _
What this cell is called wherever a human reads the graph — cards, edges, step_until.
Defaults to the Rust path, which is right for a type whose identity is its name. A cell
carrying parameters overrides it through Tag, because type_name renders those the
compiler’s way and the rest of the graph spells the same cells its own.
Sourceconst 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.
Sourceconst RETAINED: bool = false
const RETAINED: bool = false
Whether reading this in dep position reads something the engine keeps — Buffering against
the [Buffer] beside the source, Sampling against the carry beside it. Everything else is
this tick’s batch and nothing more: a bare cell, a Folding reach the node holds, a
Gating permission.
This is what says whether a tick may be withheld from a consumer. A retained dep is there
again next tick, so skipping one costs nothing; a pass-through dep skipped is a batch nobody
ever sees again. Hence Emitter::opens: the engine enforces a declared rate only where it
holds every input the node would have read.
Sourceconst 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).
A rate-preserving kernel’s rate is its leading dep’s and a Closes’s is its PERIOD, so
those never declare one — Kernel::RATE says which, and graph! derives every node’s
effective clock from it.
Who enforces the declaration follows RETAINED: see Emitter::opens.
Required Associated Types§
Provided Associated Types§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl Cell for Book
Option<&Book> is Latent, so the book can be gated — and a closed gate returns None
without pulling deps, so no checkpoint and no frame is even read.
impl Cell for Book
Option<&Book> is Latent, so the book can be gated — and a closed gate returns None
without pulling deps, so no checkpoint and no frame is even read.