pub struct Arc<T>(pub Arc<T>);
Expand description
A reference-counted pointer that implements async I/O traits.
This is just a wrapper around std::sync::Arc
that adds the following impls:
impl<T> AsyncRead for Arc<T> where &T: AsyncRead {}
impl<T> AsyncWrite for Arc<T> where &T: AsyncWrite {}
impl<T> AsyncSeek for Arc<T> where &T: AsyncSeek {}
Tuple Fields§
§0: Arc<T>
Implementations§
Trait Implementations§
source§impl<T> AsyncRead for Arc<T>
impl<T> AsyncRead for Arc<T>
source§impl<T> AsyncWrite for Arc<T>where
for<'a> &'a T: AsyncWrite,
impl<T> AsyncWrite for Arc<T>where
for<'a> &'a T: AsyncWrite,
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 Arc<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Arc<T>where
T: RefUnwindSafe,
impl<T> Send for Arc<T>
impl<T> Sync for Arc<T>
impl<T> UnwindSafe for Arc<T>where
T: RefUnwindSafe,
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