pub struct Writer<T: AsyncWrite, E: From<Error>> { /* private fields */ }
Expand description
A wrapper for AsyncWrite
types.
Implementations§
Source§impl<T: AsyncWrite, E: From<Error> + 'static> Writer<T, E>
impl<T: AsyncWrite, E: From<Error> + 'static> Writer<T, E>
pub fn new<A, C>(io: T, ctx: &mut C) -> Self
Sourcepub fn set_buffer_capacity(
&mut self,
low_watermark: usize,
high_watermark: usize,
)
pub fn set_buffer_capacity( &mut self, low_watermark: usize, high_watermark: usize, )
Sets the write buffer capacity.
Sourcepub fn handle(&self) -> SpawnHandle
pub fn handle(&self) -> SpawnHandle
Returns the SpawnHandle
for this writer.
Auto Trait Implementations§
impl<T, E> Freeze for Writer<T, E>
impl<T, E> !RefUnwindSafe for Writer<T, E>
impl<T, E> !Send for Writer<T, E>
impl<T, E> !Sync for Writer<T, E>
impl<T, E> Unpin for Writer<T, E>
impl<T, E> !UnwindSafe for Writer<T, E>
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