Struct cbnf_rs::CBNFHeader
source · #[repr(C, packed)]pub struct CBNFHeader {
pub magic: [u8; 4],
pub version: u16,
pub flags: u16,
pub padding: u8,
pub arch: u8,
pub activation: u8,
pub hidden_size: u16,
pub input_buckets: u8,
pub output_buckets: u8,
pub name_len: u8,
pub name: [u8; 48],
}
Expand description
The header of a CBNF file.
Fields§
§magic: [u8; 4]
§version: u16
§flags: u16
§padding: u8
§arch: u8
§activation: u8
§input_buckets: u8
§output_buckets: u8
§name_len: u8
§name: [u8; 48]
Implementations§
source§impl CBNFHeader
impl CBNFHeader
sourcepub fn parse(data: &[u8]) -> Option<&Self>
pub fn parse(data: &[u8]) -> Option<&Self>
Parse a CBNF header from a byte slice.
Returns None
if the data is too short or the magic number is incorrect.
Auto Trait Implementations§
impl RefUnwindSafe for CBNFHeader
impl Send for CBNFHeader
impl Sync for CBNFHeader
impl Unpin for CBNFHeader
impl UnwindSafe for CBNFHeader
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