pub struct ProjectionHead { /* private fields */ }Expand description
Re-exported so hotl_engine::ProjectionHead names what
SessionHandle::head hands out — the epoch-fenced published projection
(commit-protocol.md §Read invariant). It lives in [actor], next to the
only thing that may publish it.
The projection head the actor publishes (commit-protocol.md §Read
invariant, amendment 2): epoch-fenced, published only post-ack, and
read by turn tasks through a watch::Receiver they cannot write. The
actor is the sole publisher — the watch::Sender never leaves [Head],
which only [run] owns.
Implementations§
Source§impl ProjectionHead
impl ProjectionHead
Sourcepub fn snapshot(&self) -> Snapshot
pub fn snapshot(&self) -> Snapshot
The snapshot a turn task samples against, as two channels: the
durable projection the head already holds, and the ephemeral suffix
regenerated per read. The reminder is never spliced into items — not
even into a copy of it — so it can never be committed, replayed,
double-counted, or (the point of the split) chosen as a cache
breakpoint by a serializer that only sees a flat list.
Both fields hand back an Arc the head or the process already holds
whenever it can: the common no-todos read allocates nothing at all,
which is what keeps “Vec with clone at grant” the cost model §Read
invariant priced.