pub struct CursorView<'a> { /* private fields */ }Expand description
Read-only view over per-node, per-level cursor values used by
Policy::evaluate.
The view is indexed by node first, then level: nodes[i][level as usize] is the highest sequence node i has reached at level.
Callers (the response stage) build this view once per gate iteration
from atomic loads on the live cursors. Tests build it directly from
constant arrays.
&[[u64; 2]] rather than &[NodeCursors]: the inner array indices
match Level as usize so the hot-path lookup is a pointer-arithmetic
load rather than a struct-field branch.
Implementations§
Source§impl<'a> CursorView<'a>
impl<'a> CursorView<'a>
Sourcepub fn new(nodes: &'a [[u64; 2]]) -> CursorView<'a>
pub fn new(nodes: &'a [[u64; 2]]) -> CursorView<'a>
Build a view from a slice of [in_memory, persisted] pairs.
Caller is responsible for indexing matching Level’s discriminant
order — [0] = InMemory, [1] = Persisted.
Auto Trait Implementations§
impl<'a> Freeze for CursorView<'a>
impl<'a> RefUnwindSafe for CursorView<'a>
impl<'a> Send for CursorView<'a>
impl<'a> Sync for CursorView<'a>
impl<'a> Unpin for CursorView<'a>
impl<'a> UnsafeUnpin for CursorView<'a>
impl<'a> UnwindSafe for CursorView<'a>
Blanket Implementations§
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