Skip to main content

SinkCompat

Struct SinkCompat 

Source
pub struct SinkCompat<Psh> { /* private fields */ }
Expand description

Adapter that wraps a Push to implement the Sink trait.

Implementations§

Source§

impl<Psh> SinkCompat<Psh>

Source

pub fn into_inner(self) -> Psh

Returns the wrapped Push.

Source

pub fn as_pin_mut(self: Pin<&mut Self>) -> Pin<&mut Psh>

Returns a pinned mutable reference to the wrapped Push.

Source

pub fn as_pin_ref(self: Pin<&Self>) -> Pin<&Psh>

Returns a pinned reference to the wrapped Push.

Trait Implementations§

Source§

impl<Psh> AsMut<Psh> for SinkCompat<Psh>

Source§

fn as_mut(&mut self) -> &mut Psh

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

impl<Psh> AsRef<Psh> for SinkCompat<Psh>

Source§

fn as_ref(&self) -> &Psh

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

impl<Psh, Item> Sink<Item> for SinkCompat<Psh>
where Psh: Push<Item, ()>,

Source§

type Error = Infallible

The type of value produced by the sink when an error occurs.
Source§

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

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

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

Flush any remaining output from this sink. Read more
Source§

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

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl<'__pin, Psh> Unpin for SinkCompat<Psh>
where PinnedFieldsOf<__Origin<'__pin, Psh>>: Unpin,

Auto Trait Implementations§

§

impl<Psh> Freeze for SinkCompat<Psh>
where Psh: Freeze,

§

impl<Psh> RefUnwindSafe for SinkCompat<Psh>
where Psh: RefUnwindSafe,

§

impl<Psh> Send for SinkCompat<Psh>
where Psh: Send,

§

impl<Psh> Sync for SinkCompat<Psh>
where Psh: Sync,

§

impl<Psh> UnsafeUnpin for SinkCompat<Psh>
where Psh: UnsafeUnpin,

§

impl<Psh> UnwindSafe for SinkCompat<Psh>
where Psh: UnwindSafe,

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<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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.