pub struct LevelPool { /* private fields */ }Expand description
Pool allocator for j-tree levels
Implementations§
Source§impl LevelPool
impl LevelPool
Sourcepub fn with_config(config: PoolConfig) -> Self
pub fn with_config(config: PoolConfig) -> Self
Create with custom config
Sourcepub fn is_materialized(&self, level_idx: usize) -> bool
pub fn is_materialized(&self, level_idx: usize) -> bool
Check if level is materialized
Sourcepub fn materialize(&self, level_idx: usize, data: LevelData)
pub fn materialize(&self, level_idx: usize, data: LevelData)
Materialize a level with data
Sourcepub fn mark_dirty(&self, level_idx: usize)
pub fn mark_dirty(&self, level_idx: usize)
Mark level as dirty
Sourcepub fn mark_clean(&self, level_idx: usize)
pub fn mark_clean(&self, level_idx: usize)
Mark level as clean (after recomputation)
Sourcepub fn allocate_level(&self, level_idx: usize, capacity: usize) -> LevelData
pub fn allocate_level(&self, level_idx: usize, capacity: usize) -> LevelData
Get a recycled allocation or create new
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get current memory usage in bytes
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LevelPool
impl RefUnwindSafe for LevelPool
impl Send for LevelPool
impl Sync for LevelPool
impl Unpin for LevelPool
impl UnwindSafe for LevelPool
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
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