Skip to main content

Sink

Struct Sink 

Source
pub struct Sink { /* private fields */ }
Expand description

A writer that takes every byte and keeps none. Made by sink.

Trait Implementations§

Source§

impl AsyncWrite for Sink

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_flush(self: Pin<&mut Self>, _: &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>, _: &mut Context<'_>) -> Poll<Result<()>>

Attempt to close the object. Read more
§

fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from bufs into the object using vectored IO operations. Read more
Source§

impl Clone for Sink

Source§

fn clone(&self) -> Sink

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Sink

Source§

impl Debug for Sink

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Sink

Source§

fn default() -> Sink

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Sink

§

impl RefUnwindSafe for Sink

§

impl Send for Sink

§

impl Sync for Sink

§

impl Unpin for Sink

§

impl UnsafeUnpin for Sink

§

impl UnwindSafe for Sink

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.