Struct il2_utils::simple_serialization::SimpleSliceDeserializer[][src]

pub struct SimpleSliceDeserializer<'a> { /* fields omitted */ }
Expand description

This struct implements a simple data deserializer. It is the counterpart of the SimpleDataSerializer trait.

The template parameter E is the type used to define the type of the error that will compose the results. The actual value of E is defined by the constructor.

Implementations

Creates a new instance that reads data from the slice and returns the specified value on error.

Returns the current offset.

Return the number of bytes availble.

Returns true if there is no more bytes to read.

Trait Implementations

The slice with the last data read.

Reads the specified umber of bytes. The data read will available by Self::data(). Read more

Reads an u8 value.

Reads an i8 value.

Reads an u16 value.

Reads an u32 value.

Reads an u16 value.

Reads an i16 value.

Reads an i32 value.

Reads an i64 value.

Reads an f32 value.

Reads an f64 value.

Writes a byte array. The size of the byte array is encoded as an u16 value followed by the bytes of the array. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.