pub struct KvRing { /* private fields */ }Implementations§
Source§impl KvRing
impl KvRing
pub fn new(rows: usize, window: usize) -> KvRing
pub fn rows(&self) -> usize
pub fn base(&self) -> usize
pub fn window(&self) -> usize
Sourcepub fn append_plan(
&self,
len: usize,
retain_from: usize,
append_rows: usize,
) -> Result<KvRingAppend, String>
pub fn append_plan( &self, len: usize, retain_from: usize, append_rows: usize, ) -> Result<KvRingAppend, String>
Plan a contiguous physical append. When the tail would wrap, retain the caller’s exact aligned read prefix at row zero; the following read remains one contiguous CUDA view.
pub fn apply_rebase(&mut self, new_base: usize)
pub fn physical_range( &self, start: usize, end: usize, ) -> Result<Range<usize>, String>
Sourcepub fn can_rewind_to(&self, len: usize) -> bool
pub fn can_rewind_to(&self, len: usize) -> bool
A rewind is usable only when the next aligned Step35 window view is still resident.
Sourcepub fn restore_plan(&self, len: usize) -> Result<(usize, Range<usize>), String>
pub fn restore_plan(&self, len: usize) -> Result<(usize, Range<usize>), String>
Plan a checkpoint restore into a FRESH ring (base 0): the aligned live window ending at
absolute len, as (new_base, source physical rows). len is the ABSOLUTE stream length
the checkpoint recorded — for a lapped ring it exceeds the physical row count, so a
restore that copies len rows from row zero is an out-of-bounds device slice (the
2026-08-29 warm-turn-at-40k GPU-worker panic). Refuses when this ring no longer holds
the window (checkpoint lapped: the caller must full re-prime).
Trait Implementations§
impl Copy for KvRing
impl Eq for KvRing
impl StructuralPartialEq for KvRing
Auto Trait Implementations§
impl Freeze for KvRing
impl RefUnwindSafe for KvRing
impl Send for KvRing
impl Sync for KvRing
impl Unpin for KvRing
impl UnsafeUnpin for KvRing
impl UnwindSafe for KvRing
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