Struct scoped_stream_sink::StreamSinkWrapper
source · pub struct StreamSinkWrapper<SI, RI, E, T: ?Sized> { /* private fields */ }
Expand description
Wraps a type that implements both Stream
and Sink
.
Although such type is not very usable, both implementation is combined here
into StreamSink
.
Implementations§
source§impl<SI, RI, E, T> StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T> StreamSinkWrapper<SI, RI, E, T>
sourcepub fn new(value: T) -> Self
pub fn new(value: T) -> Self
Creates a new StreamSinkWrapper
.
source§impl<SI, RI, E, T> StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T> StreamSinkWrapper<SI, RI, E, T>
pub fn unwrap_inner(self) -> T
Trait Implementations§
source§impl<SI, RI, E, T> StreamSink<SI, RI> for StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T> StreamSink<SI, RI> for StreamSinkWrapper<SI, RI, E, T>
source§fn poll_stream_sink(self: Pin<&mut Self>, cx: &mut Context<'_>) -> State<SI, E>
fn poll_stream_sink(self: Pin<&mut Self>, cx: &mut Context<'_>) -> State<SI, E>
Poll the
StreamSink
. Read moresource§fn start_send(self: Pin<&mut Self>, item: RI) -> Result<(), E>
fn start_send(self: Pin<&mut Self>, item: RI) -> Result<(), E>
Starts sending item into
StreamSink
. Read moreimpl<'__pin, SI, RI, E, T: ?Sized> Unpin for StreamSinkWrapper<SI, RI, E, T>where
__Origin<'__pin, SI, RI, E, T>: Unpin,
Auto Trait Implementations§
impl<SI, RI, E, T: ?Sized> RefUnwindSafe for StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T: ?Sized> Send for StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T: ?Sized> Sync for StreamSinkWrapper<SI, RI, E, T>
impl<SI, RI, E, T: ?Sized> UnwindSafe for StreamSinkWrapper<SI, RI, E, T>
Blanket Implementations§
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
source§impl<SI, RI, T> StreamSinkExt<SI, RI> for Twhere
T: StreamSink<SI, RI>,
impl<SI, RI, T> StreamSinkExt<SI, RI> for Twhere
T: StreamSink<SI, RI>,
source§fn error_cast<E>(self) -> ErrorCast<Self, E>
fn error_cast<E>(self) -> ErrorCast<Self, E>
Cast the error type.
source§fn chain<Other, Item>(self, other: Other) -> Chain<Self, Other, SendItem>
fn chain<Other, Item>(self, other: Other) -> Chain<Self, Other, SendItem>
Chain two
StreamSink
. Read moresource§fn send_one<'a>(
self: Pin<&'a mut Self>,
item: RecvItem
) -> SendOne<'a, Self, SendItem, RecvItem, Self::Error>
fn send_one<'a>( self: Pin<&'a mut Self>, item: RecvItem ) -> SendOne<'a, Self, SendItem, RecvItem, Self::Error>
Send one item. Read more
source§fn send_iter<'a, I: IntoIterator<Item = RecvItem>>(
self: Pin<&'a mut Self>,
iter: I
) -> SendIter<'a, Self, SendItem, RecvItem, I::IntoIter, Self::Error>
fn send_iter<'a, I: IntoIterator<Item = RecvItem>>( self: Pin<&'a mut Self>, iter: I ) -> SendIter<'a, Self, SendItem, RecvItem, I::IntoIter, Self::Error>
Send items from an
IntoIterator
. Read moresource§fn send_try_iter<'a, I: IntoIterator<Item = Result<RecvItem, Self::Error>>>(
self: Pin<&'a mut Self>,
iter: I
) -> SendTryIter<'a, Self, SendItem, RecvItem, I::IntoIter, Self::Error>
fn send_try_iter<'a, I: IntoIterator<Item = Result<RecvItem, Self::Error>>>( self: Pin<&'a mut Self>, iter: I ) -> SendTryIter<'a, Self, SendItem, RecvItem, I::IntoIter, Self::Error>
Send items from a fallible
IntoIterator
. Read moresource§fn close<'a>(self: Pin<&'a mut Self>) -> Close<'a, Self, SendItem, RecvItem>
fn close<'a>(self: Pin<&'a mut Self>) -> Close<'a, Self, SendItem, RecvItem>
Closes the
StreamSink
. Read moresource§fn try_send_one<'a, F: FnOnce() -> RecvItem>(
self: Pin<&'a mut Self>,
f: F
) -> TrySendOne<'a, Self, SendItem, F> ⓘ
fn try_send_one<'a, F: FnOnce() -> RecvItem>( self: Pin<&'a mut Self>, f: F ) -> TrySendOne<'a, Self, SendItem, F> ⓘ
Try to send an item.
It is safe to drop the
Future
before it’s ready.