Struct btrfs_no_std::Header
source · [−]#[repr(C, packed)]pub struct Header {
pub csum: [u8; 32],
pub fs_uuid: UuidBytes,
pub logical_address: U64<LE>,
pub flags: [u8; 7],
pub backref_rev: u8,
pub chunk_tree_uuid: UuidBytes,
pub generation: U64<LE>,
pub tree_id: U64<LE>,
pub num_items: U32<LE>,
pub level: u8,
}
Expand description
The data stored at the start of every node.
Fields
csum: [u8; 32]
The checksum of everything after this field, including the internal/leaf node specific part.
fs_uuid: UuidBytes
The filesystem UUID.
logical_address: U64<LE>
The logical address of this node.
flags: [u8; 7]
The first 7 bits represent flags.
backref_rev: u8
The backref revision, which maps to a BackrefRevision value.
chunk_tree_uuid: UuidBytes
The chunk tree UUID.
generation: U64<LE>
The generation of this node.
tree_id: U64<LE>
The ID of the tree containing this node.
num_items: U32<LE>
The number of items held in this node.
level: u8
The level of this node. 0 indicates it is a leaf node.
Trait Implementations
sourceimpl AsBytes for Header
impl AsBytes for Header
sourcefn as_bytes_mut(&mut self) -> &mut [u8] where
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] where
Self: FromBytes,
Gets the bytes of this value mutably. Read more
sourcefn write_to<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self
to bytes
. Read more
sourcefn write_to_prefix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self
to the prefix of bytes
. Read more
sourcefn write_to_suffix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self
to the suffix of bytes
. Read more
sourceimpl FromBytes for Header
impl FromBytes for Header
sourcefn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from bytes
. Read more
sourcefn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from the prefix of bytes
. Read more
sourcefn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from the suffix of bytes
. Read more
sourcefn new_zeroed() -> Self
fn new_zeroed() -> Self
Creates an instance of Self
from zeroed bytes.
impl Unaligned for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more