pub struct Async<T> { /* private fields */ }Implementations§
Source§impl<T> Async<T>
impl<T> Async<T>
pub fn get_ref(&self) -> &T
pub fn get_mut(&mut self) -> &mut T
pub fn into_inner(self) -> Result<T>
pub async fn readable(&self) -> Result<()>
pub async fn writable(&self) -> Result<()>
pub async fn read_with<R>(&self, op: impl FnMut(&T) -> Result<R>) -> Result<R>
pub fn poll_read_with<R>( &self, cx: &Context<'_>, op: impl FnMut(&T) -> Result<R>, ) -> Poll<Result<R>>
pub async fn read_with_mut<R>( &mut self, op: impl FnMut(&mut T) -> Result<R>, ) -> Result<R>
pub fn poll_read_with_mut<R>( &mut self, cx: &Context<'_>, op: impl FnMut(&mut T) -> Result<R>, ) -> Poll<Result<R>>
pub async fn write_with<R>(&self, op: impl FnMut(&T) -> Result<R>) -> Result<R>
pub fn poll_write_with<R>( &self, cx: &Context<'_>, op: impl FnMut(&T) -> Result<R>, ) -> Poll<Result<R>>
pub async fn write_with_mut<R>( &mut self, op: impl FnMut(&mut T) -> Result<R>, ) -> Result<R>
pub fn poll_write_with_mut<R>( &mut self, cx: &Context<'_>, op: impl FnMut(&mut T) -> Result<R>, ) -> Poll<Result<R>>
Trait Implementations§
Source§impl<T> AsyncRead for &Async<T>
impl<T> AsyncRead for &Async<T>
Source§impl<T: Read> AsyncRead for Async<T>
impl<T: Read> AsyncRead for Async<T>
Source§impl<T> AsyncWrite for &Async<T>
impl<T> AsyncWrite for &Async<T>
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf into the object. Read moreSource§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>>
Attempt to write bytes from
bufs into the object using vectored
IO operations. Read moreSource§impl<T: Write> AsyncWrite for Async<T>
impl<T: Write> AsyncWrite for Async<T>
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf into the object. Read moreSource§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>>
Attempt to write bytes from
bufs into the object using vectored
IO operations. Read moreimpl<T> Unpin for Async<T>
Auto Trait Implementations§
impl<T> Freeze for Async<T>where
T: Freeze,
impl<T> RefUnwindSafe for Async<T>where
T: RefUnwindSafe,
impl<T> Send for Async<T>where
T: Send,
impl<T> Sync for Async<T>where
T: Sync,
impl<T> UnwindSafe for Async<T>where
T: UnwindSafe,
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