#[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: TypeZBI_TYPE_* constant.
length: u32Size of the payload immediately following this header. This does not include the header itself nor any alignment padding after the payload.
extra: u32Type-specific extra data. Each type specifies the use of this field. When not explicitly specified, it should be zero.
flags: FlagsFlags for this item.
reserved0: u32For future expansion. Set to 0.
reserved1: u32§magic: u32Must be ZBI_ITEM_MAGIC.
crc32: u32Must 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