[][src]Trait deku::DekuContainerRead

pub trait DekuContainerRead: DekuRead<()> {
    fn from_bytes(
        input: (&[u8], usize)
    ) -> Result<((&[u8], usize), Self), DekuError>
    where
        Self: Sized
; }

"Reader" trait: implemented on DekuRead struct and enum containers. A container is a type which doesn't need any context information.

Required methods

fn from_bytes(
    input: (&[u8], usize)
) -> Result<((&[u8], usize), Self), DekuError> where
    Self: Sized

Read bytes and construct type

  • input - Input as a tuple of (bytes, bit_offset)

Returns a tuple of the remaining data as (bytes, bit_offset) and a constructed value

Loading content...

Implementors

Loading content...