Skip to main content

read_bwm_from_bytes

Function read_bwm_from_bytes 

Source
pub fn read_bwm_from_bytes(bytes: &[u8]) -> Result<Bwm, BwmBinaryError>
Expand description

Reads BWM data from bytes.

§Errors

BwmBinaryError::InvalidMagic and BwmBinaryError::InvalidVersion for a header that is not a BWM of a supported version, BwmBinaryError::InvalidHeader when a section’s offset and count run past the end of bytes, and BwmBinaryError::InvalidData when the sections read and do not describe a walkmesh.