#[repr(transparent)]pub struct OwnedWriteHalf<T>(pub Rc<UnsafeCell<T>>)
where
T: AsyncWriteRent;
Expand description
Owned Write Half Part
Tuple Fields§
§0: Rc<UnsafeCell<T>>
Implementations§
Source§impl<T> OwnedWriteHalf<T>where
T: AsyncWriteRent,
impl<T> OwnedWriteHalf<T>where
T: AsyncWriteRent,
Sourcepub fn reunite(self, other: OwnedReadHalf<T>) -> Result<T, ReuniteError<T>>
pub fn reunite(self, other: OwnedReadHalf<T>) -> Result<T, ReuniteError<T>>
reunite read half
Source§impl OwnedWriteHalf<TcpStream>
impl OwnedWriteHalf<TcpStream>
Sourcepub fn peer_addr(&self) -> Result<SocketAddr>
pub fn peer_addr(&self) -> Result<SocketAddr>
Returns the remote address that this stream is connected to.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Returns the local address that this stream is bound to.
Trait Implementations§
Source§impl<Inner> AsyncWriteRent for OwnedWriteHalf<Inner>where
Inner: AsyncWriteRent,
impl<Inner> AsyncWriteRent for OwnedWriteHalf<Inner>where
Inner: AsyncWriteRent,
Source§fn write<T: IoBuf>(
&mut self,
buf: T,
) -> impl Future<Output = BufResult<usize, T>>
fn write<T: IoBuf>( &mut self, buf: T, ) -> impl Future<Output = BufResult<usize, T>>
Writes the contents of a buffer into this writer, returning the number of bytes written. Read more
Source§fn writev<T: IoVecBuf>(
&mut self,
buf_vec: T,
) -> impl Future<Output = BufResult<usize, T>>
fn writev<T: IoVecBuf>( &mut self, buf_vec: T, ) -> impl Future<Output = BufResult<usize, T>>
This function attempts to write the entire contents of
buf_vec
, but the write may not
fully succeed, and it might also result in an error. The bytes will be written starting at
the specified offset. Read moreSource§impl<Inner> CancelableAsyncWriteRent for OwnedWriteHalf<Inner>where
Inner: CancelableAsyncWriteRent,
impl<Inner> CancelableAsyncWriteRent for OwnedWriteHalf<Inner>where
Inner: CancelableAsyncWriteRent,
Source§fn cancelable_write<T: IoBuf>(
&mut self,
buf: T,
c: CancelHandle,
) -> impl Future<Output = BufResult<usize, T>>
fn cancelable_write<T: IoBuf>( &mut self, buf: T, c: CancelHandle, ) -> impl Future<Output = BufResult<usize, T>>
Same as write(2)
Source§fn cancelable_writev<T: IoVecBuf>(
&mut self,
buf_vec: T,
c: CancelHandle,
) -> impl Future<Output = BufResult<usize, T>>
fn cancelable_writev<T: IoVecBuf>( &mut self, buf_vec: T, c: CancelHandle, ) -> impl Future<Output = BufResult<usize, T>>
Same as writev(2)
Source§fn cancelable_flush(
&mut self,
c: CancelHandle,
) -> impl Future<Output = Result<()>>
fn cancelable_flush( &mut self, c: CancelHandle, ) -> impl Future<Output = Result<()>>
Flush buffered data if needed
Source§fn cancelable_shutdown(
&mut self,
c: CancelHandle,
) -> impl Future<Output = Result<()>>
fn cancelable_shutdown( &mut self, c: CancelHandle, ) -> impl Future<Output = Result<()>>
Same as shutdown
Source§impl<T> Debug for OwnedWriteHalf<T>where
T: AsyncWriteRent + Debug,
impl<T> Debug for OwnedWriteHalf<T>where
T: AsyncWriteRent + Debug,
Source§impl<T> Drop for OwnedWriteHalf<T>where
T: AsyncWriteRent,
impl<T> Drop for OwnedWriteHalf<T>where
T: AsyncWriteRent,
Auto Trait Implementations§
impl<T> Freeze for OwnedWriteHalf<T>
impl<T> !RefUnwindSafe for OwnedWriteHalf<T>
impl<T> !Send for OwnedWriteHalf<T>
impl<T> !Sync for OwnedWriteHalf<T>
impl<T> Unpin for OwnedWriteHalf<T>
impl<T> !UnwindSafe for OwnedWriteHalf<T>
Blanket Implementations§
Source§impl<A> AsyncWriteRentExt for Awhere
A: AsyncWriteRent + ?Sized,
impl<A> AsyncWriteRentExt for Awhere
A: AsyncWriteRent + ?Sized,
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