Struct zenoh_protocol::io::WBuf

source ·
pub struct WBuf { /* private fields */ }
Expand description

A writable zenoh buffer.

Implementations§

Trait Implementations§

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Constructs a split buffer that may accept slice_capacity segments without allocating. It may also accept receiving cached writes for cache_capacity bytes before needing to reallocate its cache.
Copies as much of bytes as possible inside its cache, returning the amount actually written. Will return None if the write was refused.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Returns the most appropriate reader for self
Returns the most appropriate writer for self
Returns an index-like mark that may be used for future operations at the current buffer-end
Replaces the data following from with the contents of with. Read more
Appends a slice to the buffer without copying its data.
Gets all the slices of this buffer.
Returns true if the buffer has a length of 0.
Returns the number of bytes in the buffer.
Returns all the bytes of this buffer in a conitguous slice. This may require allocation and copy if the original buffer is not contiguous.

This the traditional VByte encoding, in which an arbirary integer is encoded as a sequence of 7 bits integers

Write a buffer into this writer, returning how many bytes were written. Read more
Attempts to write an entire buffer into this writer. Read more
Like write, except that it writes from a slice of buffers. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Creates a “by reference” adapter for this instance of Write. 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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. 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.