pub struct Journal { /* private fields */ }Expand description
Represents a journal entry with version and file position.
A journal entry maps a specific version of an AIM file to its byte offset position within that file. This enables efficient random access to specific versions without having to parse the entire file.
§Examples
use aimx::aim::Journal;
let journal = Journal::new(1, 100);
assert_eq!(journal.version(), 1);
assert_eq!(journal.position(), 100);Implementations§
Source§impl Journal
impl Journal
Sourcepub fn new(version: u32, position: u64) -> Self
pub fn new(version: u32, position: u64) -> Self
Creates a new journal entry with the specified version and position.
§Arguments
version- The version number this entry representsposition- The byte offset position in the file where this version starts
§Returns
A new Journal instance.
§Examples
use aimx::aim::Journal;
let journal = Journal::new(2, 150);
assert_eq!(journal.version(), 2);
assert_eq!(journal.position(), 150);Trait Implementations§
impl Copy for Journal
impl StructuralPartialEq for Journal
Auto Trait Implementations§
impl Freeze for Journal
impl RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl UnwindSafe for Journal
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