pub struct AsyncIo<T: ?Sized> { /* private fields */ }Expand description
Adapter from ZMux async stream traits to standard async I/O traits.
With the tokio-io feature this type implements tokio::io::AsyncRead
and/or tokio::io::AsyncWrite. With the futures-io feature it implements
futures_io::AsyncRead and/or futures_io::AsyncWrite.
Implementations§
Source§impl<T: ?Sized> AsyncIo<T>
impl<T: ?Sized> AsyncIo<T>
Sourcepub fn into_inner(self) -> Arc<T> ⓘ
pub fn into_inner(self) -> Arc<T> ⓘ
Returns the shared owner of the wrapped stream.
Sourcepub fn read_chunk_size(&self) -> usize
pub fn read_chunk_size(&self) -> usize
Returns the maximum read buffer used per poll operation.
Sourcepub fn set_read_chunk_size(&mut self, size: usize)
pub fn set_read_chunk_size(&mut self, size: usize)
Sets the maximum read buffer used per poll operation.
Sourcepub fn write_chunk_size(&self) -> usize
pub fn write_chunk_size(&self) -> usize
Returns the maximum write buffer copied per poll operation.
Sourcepub fn set_write_chunk_size(&mut self, size: usize)
pub fn set_write_chunk_size(&mut self, size: usize)
Sets the maximum write buffer copied per poll operation.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AsyncIo<T>where
T: ?Sized,
impl<T> RefUnwindSafe for AsyncIo<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for AsyncIo<T>
impl<T> Sync for AsyncIo<T>
impl<T> UnsafeUnpin for AsyncIo<T>where
T: ?Sized,
impl<T> UnwindSafe for AsyncIo<T>where
T: RefUnwindSafe + ?Sized,
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