Struct wire_rs::VectoredWriter

source ·
pub struct VectoredWriter<'a, const E: bool = true> { /* private fields */ }

Implementations§

Create a VectoredWriter that can write data types sequentially to the vectored bytes slice.

Advance the writer’s index forward by the given amount of bytes, returning an error if there are insufficient bytes on the wire to do so.

Advance the writer’s index forward by the given number of bytes, or to the end of the vectored wire if the amount exceeds the number of remaining bytes.

Check if the writer has no more bytes left on the vectored wire that can be written to. If any bytes remain, return WireError::ExtraBytes; otherwise, return Ok().

Check if the writer has no more bytes left on the vectored wire that can be written to after the given action. If any bytes remain, return WireError::ExtraBytes; otherwise, return Ok().

Check whether the writer has any remaining bytes that can be written to.

Write the given data type writable to the vectored wire.

Write the given data type writable to L bytes on the vectored wire.

Trait Implementations§

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.