pub struct Node { /* private fields */ }Expand description
A reference to a single array of offsets in the journal file
Implementations§
Source§impl Node
impl Node
Sourcepub fn offset(&self) -> NonZeroU64
pub fn offset(&self) -> NonZeroU64
Get the offset of this array in the file
Sourcepub fn capacity(&self) -> NonZeroUsize
pub fn capacity(&self) -> NonZeroUsize
Get the maximum number of items this array can hold
Sourcepub fn len(&self) -> NonZeroUsize
pub fn len(&self) -> NonZeroUsize
Get the number of items available in this array
Sourcepub fn next<M: MemoryMap>(
&self,
journal_file: &JournalFile<M>,
) -> Result<Option<Self>>
pub fn next<M: MemoryMap>( &self, journal_file: &JournalFile<M>, ) -> Result<Option<Self>>
Get the next array in the chain, if any
Sourcepub fn get<M: MemoryMap>(
&self,
journal_file: &JournalFile<M>,
index: usize,
) -> Result<Option<NonZeroU64>>
pub fn get<M: MemoryMap>( &self, journal_file: &JournalFile<M>, index: usize, ) -> Result<Option<NonZeroU64>>
Get an item at the specified index
Sourcepub fn partition_point<M, F>(
&self,
journal_file: &JournalFile<M>,
left: usize,
right: usize,
predicate: F,
) -> Result<usize>
pub fn partition_point<M, F>( &self, journal_file: &JournalFile<M>, left: usize, right: usize, predicate: F, ) -> Result<usize>
Returns the first index where the predicate returns false, or array length if the predicate is true for all elements
Sourcepub fn directed_partition_point<M, F>(
&self,
journal_file: &JournalFile<M>,
left: usize,
right: usize,
predicate: F,
direction: Direction,
) -> Result<Option<usize>>
pub fn directed_partition_point<M, F>( &self, journal_file: &JournalFile<M>, left: usize, right: usize, predicate: F, direction: Direction, ) -> Result<Option<usize>>
Find the forward or backward (depending on direction) position that matches the predicate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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