pub struct Reader<'a, S = ()> { /* private fields */ }
Expand description

Reader to access FUSE requests from the transport layer data buffers.

Note that virtio spec requires driver to place any device-writable descriptors after any device-readable descriptors (2.6.4.2 in Virtio Spec v1.1). Reader will skip iterating over descriptor chain when first writable descriptor is encountered.

Implementations§

Construct a new Reader wrapper over desc_chain.

’request`: Fuse request from clients read from /dev/fuse

Construct a new Reader wrapper over desc_chain.

Read data from the data buffer into a File at offset off in asynchronous mode.

Return the number of bytes read from the data buffer. The number of bytes read can be less than count if there isn’t enough data in the buffer.

Reads an object from the descriptor chain buffer.

Reads data from the descriptor chain buffer into a file descriptor. Returns the number of bytes read from the descriptor chain buffer. The number of bytes read can be less than count if there isn’t enough data in the descriptor chain buffer.

Reads data from the descriptor chain buffer into a File at offset off. Returns the number of bytes read from the descriptor chain buffer. The number of bytes read can be less than count if there isn’t enough data in the descriptor chain buffer.

Reads exactly size of data from the descriptor chain buffer into a file descriptor.

Returns number of bytes available for reading.

May return an error if the combined lengths of all the buffers in the DescriptorChain would cause an integer overflow.

Returns number of bytes already read from the descriptor chain buffer.

Splits this Reader into two at the given offset in the DescriptorChain buffer. After the split, self will be able to read up to offset bytes while the returned Reader can read up to available_bytes() - offset bytes. Returns an error if offset > self.available_bytes().

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Like read, except that it reads into a slice of buffers. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
Read all bytes until EOF in this source, placing them into buf. Read more
Read all bytes until EOF in this source, appending them to buf. Read more
Read the exact number of bytes required to fill buf. Read more
🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
Creates a “by reference” adaptor for this instance of Read. Read more
Transforms this Read instance to an Iterator over its bytes. Read more
Creates an adapter which will chain this stream with another. Read more
Creates an adapter which will read at most limit bytes from it. 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
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.