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

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

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

Implementations

Creates a new empty instance of this struct. The new struct is set as writeable by default.

Creates a new empty instance of this struct with an initial capacity set.

Arguments:

  • capacity: The reserved capacity;

Returns the current writing position.

Returns:

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

Sets the current writing position.

Arguments:

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

Returns true if this instance is locked for writing.

Sets the read-only flag.

Arguments:

  • read_only: The new value;

Verifies if the it is possible to write into this VecWriter.

Returns:

  • Ok(()): If it is possible to write;
  • Err(ErrorKind::UnableToWriteData): If it is not possible to write;

Returns the current data as a slice.

Returns aread-only reference to the inner vector.

Trait Implementations

Returns the “default value” for a type. Read more

New since 1.4.0.

Performs the conversion.

Writes a single byte. Read more

Writes a byte slice. As this default implementation calls write() multiple times, so it is strongly recommended that each implementation provides a more efficient version for this method if possible. 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

Serializes a byte array as a slice. Read more

👎 Deprecated

Serializes a byte array as a vector. Read more

Performs the conversion.

Serializes an ILInt value. Read more

Writes the ILInt value. Read more

Performs the conversion.

Serializes an ILInt value. Read more

Writes the ILInt value. 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.

Serializes a value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more

Writes the value. Read more