#[repr(C)]pub struct HeaderPrefix {
pub magic: [u8; 4],
pub version: u32,
pub remaining_header_bytes: u32,
}Expand description
FILE FORMAT PREFIX LAYOUT. THIS MUST NEVER CHANGE The prefix is part of the on-disk binary format and is used for streaming / incremental parsing. If you modify the fields, their types, ordering, or size, all previously written files will become unreadable.
If format updates are needed, bump version instead and evolve
the rest of the header format conditionally.
Fields§
§magic: [u8; 4]§version: u32§remaining_header_bytes: u32Implementations§
Trait Implementations§
Source§impl Clone for HeaderPrefix
impl Clone for HeaderPrefix
Source§fn clone(&self) -> HeaderPrefix
fn clone(&self) -> HeaderPrefix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeaderPrefix
impl Debug for HeaderPrefix
Source§impl<'de> Deserialize<'de> for HeaderPrefix
impl<'de> Deserialize<'de> for HeaderPrefix
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HeaderPrefix
impl RefUnwindSafe for HeaderPrefix
impl Send for HeaderPrefix
impl Sync for HeaderPrefix
impl Unpin for HeaderPrefix
impl UnsafeUnpin for HeaderPrefix
impl UnwindSafe for HeaderPrefix
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