pub struct Chain { /* private fields */ }Expand description
An ordered collection of journal files from the same origin
Files are kept sorted by status and time:
- Disposed files (corrupted) come first
- Archived files follow in chronological order (by head_realtime)
- Active file (if any) comes last
This ordering is maintained automatically by insert_file()
and is critical for correct time-range queries.
Implementations§
Source§impl Chain
impl Chain
Sourcepub fn insert_file(&mut self, file: File)
pub fn insert_file(&mut self, file: File)
Insert a file maintaining sorted order (disposed → archived → active)
Sourcepub fn remove_file(&mut self, file: &File)
pub fn remove_file(&mut self, file: &File)
Remove a file from the chain
pub fn pop_front(&mut self) -> Option<File>
pub fn back(&self) -> Option<&File>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chain
impl RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl UnsafeUnpin for Chain
impl UnwindSafe for Chain
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