Expand description
Variants
NonSeekable(WO, u64)
Seekable(WS)
Implementations
sourceimpl<WO: WriteOwned> Writer<WO, Cursor<Vec<u8>>>
impl<WO: WriteOwned> Writer<WO, Cursor<Vec<u8>>>
sourcepub fn from_nonseekable(inner: WO) -> Self
pub fn from_nonseekable(inner: WO) -> Self
sourceimpl<WO: WriteOwned, WS: WriteSeek> Writer<WO, WS>
impl<WO: WriteOwned, WS: WriteSeek> Writer<WO, WS>
sourcepub fn is_seekable(&self) -> bool
pub fn is_seekable(&self) -> bool
Returns whether the Writer
can seek within the source.
sourcepub fn non_seekable_object(&self) -> Option<(<WO as ToOwned>::Owned, u64)>
pub fn non_seekable_object(&self) -> Option<(<WO as ToOwned>::Owned, u64)>
Returns the non-seekable object whether is present.
sourcepub fn seekable_object(&self) -> Option<<WS as ToOwned>::Owned>
pub fn seekable_object(&self) -> Option<<WS as ToOwned>::Owned>
Returns the seekable object whether is present.
Trait Implementations
sourceimpl<WO: WriteOwned, WS: WriteSeek> Seek for Writer<WO, WS>
impl<WO: WriteOwned, WS: WriteSeek> Seek for Writer<WO, WS>
sourcefn seek(&mut self, seek: SeekFrom) -> Result<u64>
fn seek(&mut self, seek: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · sourcefn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
sourceimpl<WO: WriteOwned, WS: WriteSeek> Write for Writer<WO, WS>
impl<WO: WriteOwned, WS: WriteSeek> Write for Writer<WO, WS>
sourcefn write(&mut self, bytes: &[u8]) -> Result<usize>
fn write(&mut self, bytes: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬 This is a nightly-only experimental API. (
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn 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
sourcefn 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
Auto Trait Implementations
impl<WO, WS> RefUnwindSafe for Writer<WO, WS> where
WO: RefUnwindSafe,
WS: RefUnwindSafe,
impl<WO, WS> Send for Writer<WO, WS> where
WO: Send,
WS: Send,
impl<WO, WS> Sync for Writer<WO, WS> where
WO: Sync,
WS: Sync,
impl<WO, WS> Unpin for Writer<WO, WS> where
WO: Unpin,
WS: Unpin,
impl<WO, WS> UnwindSafe for Writer<WO, WS> where
WO: UnwindSafe,
WS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more