#[repr(C)]pub struct Header {
pub type: Type,
pub length: u32,
pub extra: u32,
pub flags: Flags,
pub reserved0: u32,
pub reserved1: u32,
pub magic: u32,
pub crc32: u32,
}
Expand description
Each header must be 8-byte aligned. The length field specifies the actual payload length and does not include the size of padding.
Fields§
§type: Type
ZBI_TYPE_* constant.
length: u32
Size of the payload immediately following this header. This does not include the header itself nor any alignment padding after the payload.
extra: u32
Type-specific extra data. Each type specifies the use of this field. When not explicitly specified, it should be zero.
flags: Flags
Flags for this item.
reserved0: u32
For future expansion. Set to 0.
reserved1: u32
§magic: u32
Must be ZBI_ITEM_MAGIC.
crc32: u32
Must be the CRC32 of payload if ZBI_FLAGS_CRC32 is set, otherwise must be ZBI_ITEM_NO_CRC32.
Trait Implementations§
impl Copy for Header
impl Eq for Header
impl IntoBytes 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)