Struct fuse::worker::DevFuseWriter
source · struct DevFuseWriter {
dev_fuse: File,
write_buf: Cursor<Vec<u8>>,
}
Fields§
§dev_fuse: File
§write_buf: Cursor<Vec<u8>>
Implementations§
Trait Implementations§
source§impl Write for DevFuseWriter
impl Write for DevFuseWriter
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
source§impl Writer for DevFuseWriter
impl Writer for DevFuseWriter
§type ClosureWriter = DevFuseWriter
type ClosureWriter = DevFuseWriter
The type passed in to the closure in
write_at
. For most implementations, this should be
Self
.source§fn write_at<F>(&mut self, offset: usize, f: F) -> Result<usize>
fn write_at<F>(&mut self, offset: usize, f: F) -> Result<usize>
Allows a closure to generate and write data at the current writer’s offset. The current
writer is passed as a mutable reference to the closure. As an example, this provides an
adapter for the read implementation of a filesystem to write directly to the final buffer
without generating the FUSE header first. Read more
source§fn has_sufficient_buffer(&self, size: u32) -> bool
fn has_sufficient_buffer(&self, size: u32) -> bool
Checks if the writer can still accept certain amount of data.
source§impl ZeroCopyWriter for DevFuseWriter
impl ZeroCopyWriter for DevFuseWriter
source§fn write_from(&mut self, f: &mut File, count: usize, off: u64) -> Result<usize>
fn write_from(&mut self, f: &mut File, count: usize, off: u64) -> Result<usize>
Copies at most
count
bytes from f
at offset off
directly into self
without storing
it in any intermediate buffers. If the return value is Ok(n)
then it must be guaranteed
that 0 <= n <= count
. If n
is 0
, then it can indicate one of 3 possibilities: Read moreAuto Trait Implementations§
impl Freeze for DevFuseWriter
impl RefUnwindSafe for DevFuseWriter
impl Send for DevFuseWriter
impl Sync for DevFuseWriter
impl Unpin for DevFuseWriter
impl UnwindSafe for DevFuseWriter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more