Struct scoped_stream_sink::MapSend
source · pub struct MapSend<T, F, I> { /* private fields */ }
Expand description
Return type of StreamSinkExt::map_send()
.
Trait Implementations§
source§impl<T, F, SI, RI, I> StreamSink<SI, RI> for MapSend<T, F, I>where
T: StreamSink<I, RI>,
F: FnMut(I) -> SI,
impl<T, F, SI, RI, I> StreamSink<SI, RI> for MapSend<T, F, I>where
T: StreamSink<I, RI>,
F: FnMut(I) -> SI,
§type Error = <T as StreamSink<I, RI>>::Error
type Error = <T as StreamSink<I, RI>>::Error
The error type that it may return.
source§fn poll_stream_sink(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> State<SI, Self::Error>
fn poll_stream_sink( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> State<SI, Self::Error>
Poll the
StreamSink
. Read moresource§fn start_send(self: Pin<&mut Self>, item: RI) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: RI) -> Result<(), Self::Error>
Starts sending item into
StreamSink
. Read moreimpl<'__pin, T, F, I> Unpin for MapSend<T, F, I>where
__Origin<'__pin, T, F, I>: Unpin,
Auto Trait Implementations§
impl<T, F, I> RefUnwindSafe for MapSend<T, F, I>
impl<T, F, I> Send for MapSend<T, F, I>
impl<T, F, I> Sync for MapSend<T, F, I>
impl<T, F, I> UnwindSafe for MapSend<T, F, I>
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.