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.

Returns the current reading position.

Returns:

  • The current offset. It is guaranteed to be at most the total size of the data.

Sets the current reading position.

Arguments:

  • offset: The new position. It if is larger than the total length, it will assume the total length;

Returns the remanining number of bytes.

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

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

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.

Reads the ILInt. Read more

Performs the conversion.

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.

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