Struct il2_iltags::io::array::VecReader[][src]

pub struct VecReader { /* fields omitted */ }
Expand description

VecReader implements a Writer that uses a Vec a its backend.

It differs from ByteArrayReader by the fact that it copies the data into a vector owned by it instead of borrowing the data from a byte array slice.

Implementations

Creates a new VecReader with the data copied from the specified slice.

Verifies if the specified number of bytes can be read from this struct.

Returns:

  • Result(()): If it is possible to read the specified number of bytes;
  • Result(ErrorKind::UnableToReadData): If it is not possible to read the specified number of bytes;

Returns a reference to the inner data as a slice.

Returns aread-only reference to the inner vector.

Trait Implementations

Returns the current size of the data.

Returns the current offset of the data.

Sets the current offset. If offset is larger than the length, it will set the offset to to the length of the data. Read more

Returns the number of bytes available in the reader.

Returns true if this reader is empty.

This method verifies if a certain amount of bytes can be read/extracted. Read more

Reads a single byte from the source. Read more

Reads the specified number of bytes from the source. Read more

Skips some bytes from the source. Read more

Skips some bytes from the source using a u64 as its size. On 64-bit systems, this is equivalent to Self::skip() as usize is a 64-bit value. 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

Deserializes a byte array of a given size. Read more

Deserializes a byte array of a given size into slice. Read more

Deserializes a byte array of a given size into a vector. Read more

Performs the conversion.

Deserializes an ILInt value. Read more

Reads the ILInt. Read more

Performs the conversion.

Deserializes an ILInt value. Read more

Reads the ILInt. Read more

Deserializes an UTF-8 String with a given size. Read more

Reads an UTF-8 String with a given size. Read more

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.

Deserializes the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more

Reads the value. Read more