Struct Drain
#[must_use = "sinks do nothing unless polled"]
pub struct Drain<T> { /* private fields */ }
Sink for the drain function.
Trait Implementations
impl<T> Clone for Drain<T>
fn clone(&self) -> Self
impl<T> Sink<T> for Drain<T>
type Error = never;fn poll_ready(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn start_send(self: Pin<&mut Self>, _item: T) -> Result<(), Self::Error>fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn poll_close(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
impl<T> Unpin for Drain<T>
impl<T: Debug> Debug for Drain<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T> Freeze for Drain<T>
where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for Drain<T>
where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for Drain<T>
where
PhantomData<T>: Send,
impl<T> Sync for Drain<T>
where
PhantomData<T>: Sync,
impl<T> UnsafeUnpin for Drain<T>
where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for Drain<T>
where
PhantomData<T>: UnwindSafe,
Blanket Implementations
impl<T> Any for Drain<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Drain<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Drain<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Drain<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Drain<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Drain<T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, Item> SinkExt<Item> for Drain<T>
where
T: Sink<Item> + ?Sized,
impl<T, U> Into<U> for Drain<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Drain<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Drain<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>