Skip to main content

BinaryReaderMut

Trait BinaryReaderMut 

Source
pub trait BinaryReaderMut {
    // Required method
    fn read_from_slice_mut(
        &mut self,
        reader: &mut UserSliceReader,
        offset: &mut Offset,
    ) -> Result<usize>;
}
Expand description

Trait for types that can be constructed from a binary representation.

See also BinaryReader for interior mutability.

Required Methods§

Source

fn read_from_slice_mut( &mut self, reader: &mut UserSliceReader, offset: &mut Offset, ) -> Result<usize>

Reads the binary form of self from reader.

Same as BinaryReader::read_from_slice, but takes a mutable reference.

offset is the requested offset into the binary representation of self.

On success, returns the number of bytes read from reader.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§