Skip to main content

parse_header

Function parse_header 

Source
pub fn parse_header(bytes: &[u8]) -> Result<Header, RomError>
Expand description

Parse a 16-byte header into a Header.

ยงErrors

Returns RomError::Truncated if bytes is < 16 bytes; RomError::BadMagic if the magic does not match. Header-internal inconsistencies are returned as RomError::InvalidConfig.