Skip to main content

read_enum

Function read_enum 

Source
pub fn read_enum<E: CEnum>(
    r: &mut BufferReader<'_>,
) -> Result<E, BufferDecodeError>
Expand description

Read a C-style enum from a value buffer (the body of its BufferValue::read_value).

§Errors

Returns an error when the buffer is exhausted or the discriminant isn’t one of E’s.