Function binrw::helpers::read_u24

source ·
pub fn read_u24<__BinrwGeneratedStreamT: Read + Seek>(
    reader: &mut __BinrwGeneratedStreamT,
    endian: Endian,
    (): (),
) -> BinResult<u32>
Expand description

Reads a 24-bit unsigned integer.

§Errors

If reading fails, an Error variant will be returned.

§Examples

#[derive(BinRead)]
struct Test {
    flags: u8,
    #[br(parse_with = binrw::helpers::read_u24)]
    value: u32,
}