#[repr(C, packed(1))]pub struct Header {
pub magic: u32,
pub version: [u16; 3],
pub _reserved: [u8; 6],
}Fields§
§magic: u32The magic number of this header
version: [u16; 3]The version of this kernel.
§Structures of this field
To create this version, this must obey this rule:
- For bit 0~2, that’s the first version number;
- For bit 3~4, that’s the second version number;
- And bit 5~6, it’s the last version number.
This field has 3 u16 values, so the version
format shall like this: X.Y.Z
§Example
0.3.1=>0x0000_0003_0001 [0, 3, 1];1.0.3=>0x0001_0000_0003 [1, 0, 3];0.1.218=> 0x0000_0001_026a [0, 1, 218].
_reserved: [u8; 6]Reserved bits
Implementations§
Trait Implementations§
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