Struct SequenceBlockTable
pub struct SequenceBlockTable { /* private fields */ }Expand description
One sequence’s logical-page ownership. Capacity is fixed at construction.
Implementations§
§impl SequenceBlockTable
impl SequenceBlockTable
pub fn new(logical_pages: u32) -> SequenceBlockTable
pub fn new(logical_pages: u32) -> SequenceBlockTable
Allocates a block table for logical_pages pages.
pub fn entries_mut(&mut self) -> &mut [u32]
pub fn entries_mut(&mut self) -> &mut [u32]
Mutable mapping entries.
pub fn repoint_block(&mut self, from: u32, to: u32) -> usize
pub fn repoint_block(&mut self, from: u32, to: u32) -> usize
Repoints every entry from to to; returns the count repointed.
pub fn get(&self, logical_page: u32) -> Option<u32>
pub fn get(&self, logical_page: u32) -> Option<u32>
Physical block for logical_page, or None when unmapped.
pub fn ensure_writable(
&mut self,
logical_page: u32,
pool: &mut BlockPool,
) -> Result<CopyOnWrite, TableError>
pub fn ensure_writable( &mut self, logical_page: u32, pool: &mut BlockPool, ) -> Result<CopyOnWrite, TableError>
Copy-on-write: allocates a fresh block when the entry is shared.
pub fn fork_into(
&self,
target: &mut SequenceBlockTable,
pool: &mut BlockPool,
) -> Result<(), TableError>
pub fn fork_into( &self, target: &mut SequenceBlockTable, pool: &mut BlockPool, ) -> Result<(), TableError>
Copies this table into target, bumping pool refcounts.
Attach graph/prompt-cache prefix pages to an empty sequence table.
Reference counts are retained before publishing entries; failures roll back, so a denied or stale graph prefix cannot partially mutate request state.
pub fn release_all(&mut self, pool: &mut BlockPool) -> Result<(), TableError>
pub fn release_all(&mut self, pool: &mut BlockPool) -> Result<(), TableError>
Releases every held block back to pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SequenceBlockTable
impl RefUnwindSafe for SequenceBlockTable
impl Send for SequenceBlockTable
impl Sync for SequenceBlockTable
impl Unpin for SequenceBlockTable
impl UnsafeUnpin for SequenceBlockTable
impl UnwindSafe for SequenceBlockTable
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more