#[non_exhaustive]pub struct Header {
pub csum: [u8; 4],
pub fsid: [u8; 16],
pub bytenr: u64,
pub flags: u64,
pub chunk_tree_uuid: [u8; 16],
pub generation: u64,
pub owner: u64,
pub nritems: u32,
pub level: u8,
}Expand description
A parsed btrfs_header — the fixed 101-byte prefix of every node/leaf.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.csum: [u8; 4]csum — the first 4 bytes of the 32-byte checksum field (the crc32c
digest for a crc32c filesystem), verbatim.
fsid: [u8; 16]fsid (offset 0x20) — the filesystem UUID.
bytenr: u64bytenr (offset 0x30) — this node’s own logical address.
flags: u64flags (offset 0x38).
chunk_tree_uuid: [u8; 16]chunk_tree_uuid (offset 0x40).
generation: u64generation (offset 0x50) — the transaction id that wrote this block
(the CoW/staleness lever: an older generation marks a stale block).
owner: u64owner (offset 0x58) — the objectid of the tree this block belongs to
(1 = ROOT_TREE, 3 = CHUNK_TREE, …).
nritems: u32nritems (offset 0x60) — the number of items (leaf) or key-pointers
(interior) that follow the header.
level: u8level (offset 0x64) — 0 = leaf, > 0 = interior node.
Trait Implementations§
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnsafeUnpin for Header
impl UnwindSafe for Header
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