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
impl AsyncWrite for Sink
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_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>>
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
impl Copy for Sink
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<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
Source§fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> ⓘwhere
Self: Unpin,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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> 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