Struct OwnedReadHalf

Source
pub struct OwnedReadHalf<T>(pub Rc<UnsafeCell<T>>);
Expand description

Owned Read Half Part

Tuple Fields§

§0: Rc<UnsafeCell<T>>

Implementations§

Source§

impl<T> OwnedReadHalf<T>
where T: AsyncWriteRent,

Source

pub fn reunite(self, other: OwnedWriteHalf<T>) -> Result<T, ReuniteError<T>>

reunite write half

Source§

impl OwnedReadHalf<TcpStream>

Source

pub fn peer_addr(&self) -> Result<SocketAddr>

Returns the remote address that this stream is connected to.

Source

pub fn local_addr(&self) -> Result<SocketAddr>

Returns the local address that this stream is bound to.

Source§

impl OwnedReadHalf<UnixStream>

Source

pub fn peer_addr(&self) -> Result<SocketAddr>

Returns the remote address that this stream is connected to.

Source

pub fn local_addr(&self) -> Result<SocketAddr>

Returns the local address that this stream is bound to.

Trait Implementations§

Source§

impl<Inner> AsyncReadRent for OwnedReadHalf<Inner>
where Inner: AsyncReadRent,

Source§

fn read<T: IoBufMut>( &mut self, buf: T, ) -> impl Future<Output = BufResult<usize, T>>

Reads bytes from this source into the provided buffer, returning the number of bytes read. Read more
Source§

fn readv<T: IoVecBufMut>( &mut self, buf: T, ) -> impl Future<Output = BufResult<usize, T>>

Similar to read, but reads data into a slice of buffers. Read more
Source§

impl<Inner> CancelableAsyncReadRent for OwnedReadHalf<Inner>

Source§

fn cancelable_read<T: IoBufMut>( &mut self, buf: T, c: CancelHandle, ) -> impl Future<Output = BufResult<usize, T>>

Same as read(2)
Source§

fn cancelable_readv<T: IoVecBufMut>( &mut self, buf: T, c: CancelHandle, ) -> impl Future<Output = BufResult<usize, T>>

Same as readv(2)
Source§

impl<T: Debug> Debug for OwnedReadHalf<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for OwnedReadHalf<T>

§

impl<T> !RefUnwindSafe for OwnedReadHalf<T>

§

impl<T> !Send for OwnedReadHalf<T>

§

impl<T> !Sync for OwnedReadHalf<T>

§

impl<T> Unpin for OwnedReadHalf<T>

§

impl<T> !UnwindSafe for OwnedReadHalf<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<A> AsyncReadRentExt for A
where A: AsyncReadRent + ?Sized,

Source§

async fn read_exact<T>(&mut self, buf: T) -> (Result<usize, Error>, T)
where T: IoBufMut + 'static,

Read until buf capacity is fulfilled
Source§

async fn read_vectored_exact<T>(&mut self, buf: T) -> (Result<usize, Error>, T)
where T: IoVecBufMut + 'static,

Readv until buf capacity is fulfilled
Source§

async fn read_u8(&mut self) -> Result<u8, Error>

Read number in async way
Source§

async fn read_u16(&mut self) -> Result<u16, Error>

Read number in async way
Source§

async fn read_u32(&mut self) -> Result<u32, Error>

Read number in async way
Source§

async fn read_u64(&mut self) -> Result<u64, Error>

Read number in async way
Source§

async fn read_u128(&mut self) -> Result<u16, Error>

Read number in async way
Source§

async fn read_i8(&mut self) -> Result<i8, Error>

Read number in async way
Source§

async fn read_i16(&mut self) -> Result<i16, Error>

Read number in async way
Source§

async fn read_i32(&mut self) -> Result<i32, Error>

Read number in async way
Source§

async fn read_i64(&mut self) -> Result<i64, Error>

Read number in async way
Source§

async fn read_i128(&mut self) -> Result<i128, Error>

Read number in async way
Source§

async fn read_f32(&mut self) -> Result<f32, Error>

Read number in async way
Source§

async fn read_f64(&mut self) -> Result<f64, Error>

Read number in async way
Source§

async fn read_u8_le(&mut self) -> Result<u8, Error>

Read number in async way
Source§

async fn read_u16_le(&mut self) -> Result<u16, Error>

Read number in async way
Source§

async fn read_u32_le(&mut self) -> Result<u32, Error>

Read number in async way
Source§

async fn read_u64_le(&mut self) -> Result<u64, Error>

Read number in async way
Source§

async fn read_u128_le(&mut self) -> Result<u128, Error>

Read number in async way
Source§

async fn read_i8_le(&mut self) -> Result<i8, Error>

Read number in async way
Source§

async fn read_i16_le(&mut self) -> Result<i16, Error>

Read number in async way
Source§

async fn read_i32_le(&mut self) -> Result<i32, Error>

Read number in async way
Source§

async fn read_i64_le(&mut self) -> Result<i64, Error>

Read number in async way
Source§

async fn read_i128_le(&mut self) -> Result<i128, Error>

Read number in async way
Source§

async fn read_f32_le(&mut self) -> Result<f32, Error>

Read number in async way
Source§

async fn read_f64_le(&mut self) -> Result<f64, Error>

Read number in async way
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<A> CancelableAsyncReadRentExt for A

Source§

async fn cancelable_read_exact<T>( &mut self, buf: T, c: CancelHandle, ) -> (Result<usize, Error>, T)
where T: IoBufMut + 'static,

Read until buf capacity is fulfilled
Source§

async fn cancelable_read_vectored_exact<T>( &mut self, buf: T, c: CancelHandle, ) -> (Result<usize, Error>, T)
where T: IoVecBufMut + 'static,

Readv until buf capacity is fulfilled
Source§

async fn cancelable_read_u8(&mut self, c: CancelHandle) -> Result<u8, Error>

Read number in async way
Source§

async fn cancelable_read_u16(&mut self, c: CancelHandle) -> Result<u16, Error>

Read number in async way
Source§

async fn cancelable_read_u32(&mut self, c: CancelHandle) -> Result<u32, Error>

Read number in async way
Source§

async fn cancelable_read_u64(&mut self, c: CancelHandle) -> Result<u64, Error>

Read number in async way
Source§

async fn cancelable_read_u128(&mut self, c: CancelHandle) -> Result<u128, Error>

Read number in async way
Source§

async fn cancelable_read_i8(&mut self, c: CancelHandle) -> Result<i8, Error>

Read number in async way
Source§

async fn cancelable_read_i16(&mut self, c: CancelHandle) -> Result<i16, Error>

Read number in async way
Source§

async fn cancelable_read_i32(&mut self, c: CancelHandle) -> Result<i32, Error>

Read number in async way
Source§

async fn cancelable_read_i64(&mut self, c: CancelHandle) -> Result<i64, Error>

Read number in async way
Source§

async fn cancelable_read_i128(&mut self, c: CancelHandle) -> Result<i128, Error>

Read number in async way
Source§

async fn cancelable_read_f32(&mut self, c: CancelHandle) -> Result<f32, Error>

Read number in async way
Source§

async fn cancelable_read_f64(&mut self, c: CancelHandle) -> Result<f64, Error>

Read number in async way
Source§

async fn cancelable_read_u8_le(&mut self, c: CancelHandle) -> Result<u8, Error>

Read number in async way
Source§

async fn cancelable_read_u16_le( &mut self, c: CancelHandle, ) -> Result<u16, Error>

Read number in async way
Source§

async fn cancelable_read_u32_le( &mut self, c: CancelHandle, ) -> Result<u32, Error>

Read number in async way
Source§

async fn cancelable_read_u64_le( &mut self, c: CancelHandle, ) -> Result<u64, Error>

Read number in async way
Source§

async fn cancelable_read_u128_le( &mut self, c: CancelHandle, ) -> Result<u128, Error>

Read number in async way
Source§

async fn cancelable_read_i8_le(&mut self, c: CancelHandle) -> Result<i8, Error>

Read number in async way
Source§

async fn cancelable_read_i16_le( &mut self, c: CancelHandle, ) -> Result<i16, Error>

Read number in async way
Source§

async fn cancelable_read_i32_le( &mut self, c: CancelHandle, ) -> Result<i32, Error>

Read number in async way
Source§

async fn cancelable_read_i64_le( &mut self, c: CancelHandle, ) -> Result<i64, Error>

Read number in async way
Source§

async fn cancelable_read_i128_le( &mut self, c: CancelHandle, ) -> Result<i128, Error>

Read number in async way
Source§

async fn cancelable_read_f32_le( &mut self, c: CancelHandle, ) -> Result<f32, Error>

Read number in async way
Source§

async fn cancelable_read_f64_le( &mut self, c: CancelHandle, ) -> Result<f64, Error>

Read number in async way
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.