Skip to main content

WriteHalf

Struct WriteHalf 

Source
pub struct WriteHalf<'a, S>(/* private fields */);
Expand description

The write half of a stream, borrowed from it.

Trait Implementations§

Source§

impl<S> AsRef<Handle<S>> for WriteHalf<'_, S>

Source§

fn as_ref(&self) -> &Handle<S>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a, S> AsyncWrite for WriteHalf<'a, S>
where for<'x> &'x Handle<S>: AsyncWrite,

Source§

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 more
Source§

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 more
Source§

fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Source§

fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>

Attempt to close the object. Read more
Source§

impl<'a, S: Debug> Debug for WriteHalf<'a, S>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for WriteHalf<'a, S>

§

impl<'a, S> !UnwindSafe for WriteHalf<'a, S>

§

impl<'a, S> Freeze for WriteHalf<'a, S>

§

impl<'a, S> Send for WriteHalf<'a, S>
where S: Sync,

§

impl<'a, S> Sync for WriteHalf<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for WriteHalf<'a, S>

§

impl<'a, S> UnsafeUnpin for WriteHalf<'a, S>

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<W> AsyncWriteExt for W
where W: AsyncWrite + ?Sized,

Source§

fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> ⓘ
where Self: Unpin,

Writes some of buf, answering how many bytes.
Source§

fn write_vectored<'a, 'b>( &'a mut self, bufs: &'a [IoSlice<'b>], ) -> WriteVectored<'a, 'b, Self> ⓘ
where Self: Unpin,

Writes some of the slices bufs, in order, answering how many bytes.
Source§

fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self> ⓘ
where Self: Unpin,

Writes all of buf; a writer that takes no more bytes is a WriteZero error.
Source§

fn flush(&mut self) -> Flush<'_, Self> ⓘ
where Self: Unpin,

Writes out what the writer holds back, down to its destination.
Source§

fn shutdown(&mut self) -> Shutdown<'_, Self> ⓘ
where Self: Unpin,

Flushes and closes the writing side (poll_close): a socket sends its end of stream, a pipe’s reader sees its end.
Source§

fn write_u8(&mut self, n: u8) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes an unsigned byte, all of its bytes.
Source§

fn write_i8(&mut self, n: i8) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a signed byte, all of its bytes.
Source§

fn write_u16(&mut self, n: u16) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian u16, all of its bytes.
Source§

fn write_u16_le(&mut self, n: u16) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian u16, all of its bytes.
Source§

fn write_i16(&mut self, n: i16) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian i16, all of its bytes.
Source§

fn write_i16_le(&mut self, n: i16) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian i16, all of its bytes.
Source§

fn write_u32(&mut self, n: u32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian u32, all of its bytes.
Source§

fn write_u32_le(&mut self, n: u32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian u32, all of its bytes.
Source§

fn write_i32(&mut self, n: i32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian i32, all of its bytes.
Source§

fn write_i32_le(&mut self, n: i32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian i32, all of its bytes.
Source§

fn write_u64(&mut self, n: u64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian u64, all of its bytes.
Source§

fn write_u64_le(&mut self, n: u64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian u64, all of its bytes.
Source§

fn write_i64(&mut self, n: i64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian i64, all of its bytes.
Source§

fn write_i64_le(&mut self, n: i64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian i64, all of its bytes.
Source§

fn write_u128(&mut self, n: u128) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian u128, all of its bytes.
Source§

fn write_u128_le(&mut self, n: u128) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian u128, all of its bytes.
Source§

fn write_i128(&mut self, n: i128) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian i128, all of its bytes.
Source§

fn write_i128_le(&mut self, n: i128) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian i128, all of its bytes.
Source§

fn write_f32(&mut self, n: f32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian f32, all of its bytes.
Source§

fn write_f32_le(&mut self, n: f32) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian f32, all of its bytes.
Source§

fn write_f64(&mut self, n: f64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a big-endian f64, all of its bytes.
Source§

fn write_f64_le(&mut self, n: f64) -> WriteNumber<'_, Self, { _ }> ⓘ
where Self: Unpin,

Writes a little-endian f64, all of its bytes.
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<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.

§

impl<T> MaybeSend for T
where T: Send + ?Sized,

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.