pub struct Write { /* private fields */ }
Expand description
I/O-free coroutine for writing bytes into a stream.
Implementations§
Source§impl Write
impl Write
Sourcepub fn new(bytes: impl IntoIterator<Item = u8>) -> Self
pub fn new(bytes: impl IntoIterator<Item = u8>) -> Self
Creates a new coroutine to write the given bytes.
Sourcepub fn replace(&mut self, bytes: impl IntoIterator<Item = u8>)
pub fn replace(&mut self, bytes: impl IntoIterator<Item = u8>)
Replaces the inner bytes with the given one.
Sourcepub fn extend(&mut self, more_bytes: impl IntoIterator<Item = u8>)
pub fn extend(&mut self, more_bytes: impl IntoIterator<Item = u8>)
Adds the given bytes the to inner buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Write
impl RefUnwindSafe for Write
impl Send for Write
impl Sync for Write
impl Unpin for Write
impl UnwindSafe for Write
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