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
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.
pub fn read_to_at<F: FileReadWriteVolatile>(
&mut self,
dst: F,
count: usize,
off: u64
) -> Result<usize>
pub fn read_to_at<F: FileReadWriteVolatile>(
&mut self,
dst: F,
count: usize,
off: u64
) -> Result<usize>
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
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
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
read_initializer
)Determines if this Read
er 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
Creates an adapter which will chain this stream with another. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more