pub struct ResidentTpKvCache { /* private fields */ }Implementations§
Source§impl ResidentTpKvCache
impl ResidentTpKvCache
pub fn new( ranks: Vec<ResidentTpKvCacheRank>, kv_dim_k: usize, kv_dim_v: usize, k_tok_bytes: usize, v_tok_bytes: usize, capacity: usize, ) -> ResidentTpKvCache
pub fn new_swa( ranks: Vec<ResidentTpKvCacheRank>, kv_dim_k: usize, kv_dim_v: usize, k_tok_bytes: usize, v_tok_bytes: usize, capacity: usize, window: usize, ) -> ResidentTpKvCache
pub fn begin_transaction(&mut self) -> Result<TpKvTransaction, String>
pub fn committed_len(&self) -> usize
pub fn staged_len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn physical_capacity(&self) -> usize
pub fn ring_window(&self) -> Option<usize>
pub fn ring_base(&self) -> Option<usize>
pub fn physical_range( &self, start: usize, end: usize, ) -> Result<Range<usize>, String>
pub fn can_rewind_to(&self, target: usize) -> bool
pub fn kv_dim_k(&self) -> usize
pub fn kv_dim_v(&self) -> usize
pub fn k_tok_bytes(&self) -> usize
pub fn v_tok_bytes(&self) -> usize
pub fn ranks_len(&self) -> usize
pub fn rank(&self, rank: usize) -> Option<&ResidentTpKvCacheRank>
pub fn rank_mut(&mut self, rank: usize) -> Option<&mut ResidentTpKvCacheRank>
pub fn ranks(&self) -> &[ResidentTpKvCacheRank]
pub fn ranks_mut(&mut self) -> &mut [ResidentTpKvCacheRank]
pub fn prepare_grow( &self, target_capacity: usize, rows: usize, ) -> Result<TpKvGrowPlan, String>
pub fn publish_grow(&mut self, plan: TpKvGrowPlan) -> Result<(), String>
pub fn prepare_append( &self, transaction: TpKvTransaction, rows: usize, ) -> Result<TpKvAppendPlan, String>
Sourcepub fn peek_append_ring(&self, rows: usize) -> Result<(usize, bool), String>
pub fn peek_append_ring(&self, rows: usize) -> Result<(usize, bool), String>
Read-only peek at the NEXT append’s ring plan: (write_row, would_rebase). The dcw (device-counter) append path uses it to route rebase tokens through the full host path — the in-kernel row (len - base) is only valid for contiguous appends.
pub fn publish_append_rebase( &mut self, plan: TpKvAppendPlan, ) -> Result<(), String>
pub fn publish_append_plan( &mut self, plan: TpKvAppendPlan, ) -> Result<(), String>
pub fn publish_hydration( &mut self, logical_len: usize, resident_start: usize, ) -> Result<(), Box<dyn Error>>
pub fn append_target( &self, transaction: TpKvTransaction, rows: usize, ) -> Result<usize, String>
pub fn publish_append( &mut self, transaction: TpKvTransaction, target: usize, ) -> Result<(), String>
pub fn commit_target( &self, transaction: TpKvTransaction, accepted_rows: usize, ) -> Result<usize, String>
pub fn validate_transaction( &self, transaction: TpKvTransaction, ) -> Result<(), String>
pub fn publish_finalize( &mut self, transaction: TpKvTransaction, target: usize, ) -> Result<(), String>
pub fn rewind_to(&mut self, target: usize) -> Result<(), Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for ResidentTpKvCache
impl RefUnwindSafe for ResidentTpKvCache
impl Send for ResidentTpKvCache
impl Sync for ResidentTpKvCache
impl Unpin for ResidentTpKvCache
impl UnsafeUnpin for ResidentTpKvCache
impl UnwindSafe for ResidentTpKvCache
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