pub struct List { /* private fields */ }Expand description
A linked list of offset arrays
Implementations§
Source§impl List
impl List
Sourcepub fn new(head_offset: NonZeroU64, total_items: NonZeroUsize) -> Self
pub fn new(head_offset: NonZeroU64, total_items: NonZeroUsize) -> Self
Create a new list from head offset and total items
Sourcepub fn head<M: MemoryMap>(&self, journal_file: &JournalFile<M>) -> Result<Node>
pub fn head<M: MemoryMap>(&self, journal_file: &JournalFile<M>) -> Result<Node>
Get the head array of this chain
Sourcepub fn tail<M: MemoryMap>(&self, journal_file: &JournalFile<M>) -> Result<Node>
pub fn tail<M: MemoryMap>(&self, journal_file: &JournalFile<M>) -> Result<Node>
Get the tail array of this list by traversing from head to tail
Sourcepub fn cursor_head(self) -> Cursor
pub fn cursor_head(self) -> Cursor
Get a cursor at the first position in the chain
Sourcepub fn cursor_tail<M: MemoryMap>(
self,
journal_file: &JournalFile<M>,
) -> Result<Cursor>
pub fn cursor_tail<M: MemoryMap>( self, journal_file: &JournalFile<M>, ) -> Result<Cursor>
Get a cursor at the last position in the chain
pub fn directed_partition_point<M, F>( self, journal_file: &JournalFile<M>, predicate: F, direction: Direction, ) -> Result<Option<Cursor>>
Sourcepub fn collect_offsets<M: MemoryMap>(
&self,
journal_file: &JournalFile<M>,
offsets: &mut Vec<NonZeroU64>,
) -> Result<()>
pub fn collect_offsets<M: MemoryMap>( &self, journal_file: &JournalFile<M>, offsets: &mut Vec<NonZeroU64>, ) -> Result<()>
Collect all offsets in the entire list into the given vector
Trait Implementations§
Auto Trait Implementations§
impl Freeze for List
impl RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnsafeUnpin for List
impl UnwindSafe for List
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