pub struct JournalInfoBlock {
pub flags: u32,
pub offset: u64,
pub size: u64,
}Expand description
The relevant fields of a JournalInfoBlock (TN1150 / hfs_format.h).
Parsed big-endian. The device signature, UUID, and serial number are not
needed for in-FS journals and are skipped.
Fields§
§flags: u32§offset: u64Byte offset of the journal header, relative to the partition start.
size: u64Total journal size in bytes (header block + circular buffer).
Implementations§
Source§impl JournalInfoBlock
impl JournalInfoBlock
Sourcepub fn parse(data: &[u8]) -> Result<Self, JournalError>
pub fn parse(data: &[u8]) -> Result<Self, JournalError>
Parse from the 512+ byte block the volume header’s journalInfoBlock
points at. Layout: flags@0, device_signature[8]@4, offset@36,
size@44 — all big-endian.
Sourcepub fn is_in_fs(&self) -> bool
pub fn is_in_fs(&self) -> bool
True when the journal lives inside this filesystem (the case we handle).
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
True when the journal lives on a separate device (out of scope).
Trait Implementations§
Source§impl Clone for JournalInfoBlock
impl Clone for JournalInfoBlock
Auto Trait Implementations§
impl Freeze for JournalInfoBlock
impl RefUnwindSafe for JournalInfoBlock
impl Send for JournalInfoBlock
impl Sync for JournalInfoBlock
impl Unpin for JournalInfoBlock
impl UnsafeUnpin for JournalInfoBlock
impl UnwindSafe for JournalInfoBlock
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