Struct fuse_backend_rs::transport::Reader[][src]

pub struct Reader<'a> { /* fields omitted */ }
Expand description

Provides high-level interface over the sequence of memory regions defined by readable descriptors in the descriptor chain.

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

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

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

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. 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

Creates a “by reference” adapter 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.