pub struct PrefixKvStore<const ENTRIES: usize, const PAGES: usize> { /* private fields */ }Expand description
Fixed-capacity graph-prefix store with explicit physical-page ownership.
Implementations§
Source§impl<const ENTRIES: usize, const PAGES: usize> PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> PrefixKvStore<ENTRIES, PAGES>
pub const fn new() -> Self
pub fn get(&self, identity: PrefixIdentity) -> Option<PrefixPageSet<PAGES>>
Sourcepub fn publish(
&mut self,
set: PrefixPageSet<PAGES>,
pool: &mut BlockPool,
) -> Result<(), PrefixKvError>
pub fn publish( &mut self, set: PrefixPageSet<PAGES>, pool: &mut BlockPool, ) -> Result<(), PrefixKvError>
Publish pages and retain one pool reference for the registry.
Retains happen before publication. A failed retain or registry insert rolls back, and an update/eviction releases the old registry ownership only after the new set is visible.
Sourcepub fn attach(
&self,
identity: PrefixIdentity,
table: &mut SequenceBlockTable,
pool: &mut BlockPool,
) -> Result<Option<u32>, PrefixKvError>
pub fn attach( &self, identity: PrefixIdentity, table: &mut SequenceBlockTable, pool: &mut BlockPool, ) -> Result<Option<u32>, PrefixKvError>
Attach a matching prefix to an empty request table.
Sourcepub fn remove(
&mut self,
identity: PrefixIdentity,
pool: &mut BlockPool,
) -> Result<bool, PrefixKvError>
pub fn remove( &mut self, identity: PrefixIdentity, pool: &mut BlockPool, ) -> Result<bool, PrefixKvError>
Evict a prefix and release the registry’s page references.
Trait Implementations§
Auto Trait Implementations§
impl<const ENTRIES: usize, const PAGES: usize> Freeze for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> RefUnwindSafe for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> Send for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> Sync for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> Unpin for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> UnsafeUnpin for PrefixKvStore<ENTRIES, PAGES>
impl<const ENTRIES: usize, const PAGES: usize> UnwindSafe for PrefixKvStore<ENTRIES, PAGES>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.