Struct futures::compat::CompatSink
source · [−]pub struct CompatSink<T, Item> { /* private fields */ }
Implementations
sourceimpl<T, Item> CompatSink<T, Item>
impl<T, Item> CompatSink<T, Item>
sourcepub fn new(inner: T) -> CompatSink<T, Item>
pub fn new(inner: T) -> CompatSink<T, Item>
Creates a new CompatSink
.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the inner item.
Trait Implementations
sourceimpl<T, Item> Debug for CompatSink<T, Item> where
T: Debug,
Item: Debug,
impl<T, Item> Debug for CompatSink<T, Item> where
T: Debug,
Item: Debug,
sourceimpl<T, Item> Sink for CompatSink<T, Item> where
T: Sink<Item> + Unpin,
impl<T, Item> Sink for CompatSink<T, Item> where
T: Sink<Item> + Unpin,
type SinkItem = Item
type SinkItem = Item
The type of value that the sink accepts.
type SinkError = <T as Sink<Item>>::Error
type SinkError = <T as Sink<Item>>::Error
The type of value produced by the sink when an error occurs.
sourcepub fn start_send(
&mut self,
item: <CompatSink<T, Item> as Sink>::SinkItem
) -> Result<AsyncSink<<CompatSink<T, Item> as Sink>::SinkItem>, <CompatSink<T, Item> as Sink>::SinkError>
pub fn start_send(
&mut self,
item: <CompatSink<T, Item> as Sink>::SinkItem
) -> Result<AsyncSink<<CompatSink<T, Item> as Sink>::SinkItem>, <CompatSink<T, Item> as Sink>::SinkError>
Begin the process of sending a value to the sink. Read more
sourcepub fn poll_complete(
&mut self
) -> Result<Async<()>, <CompatSink<T, Item> as Sink>::SinkError>
pub fn poll_complete(
&mut self
) -> Result<Async<()>, <CompatSink<T, Item> as Sink>::SinkError>
Flush all output from this sink, if necessary. Read more
sourcepub fn close(
&mut self
) -> Result<Async<()>, <CompatSink<T, Item> as Sink>::SinkError>
pub fn close(
&mut self
) -> Result<Async<()>, <CompatSink<T, Item> as Sink>::SinkError>
A method to indicate that no more values will ever be pushed into this sink. Read more
sourcefn wait(self) -> Wait<Self>
fn wait(self) -> Wait<Self>
Creates a new object which will produce a synchronous sink. Read more
sourcefn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut> where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut> where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
Composes a function in front of the sink. Read more
sourcefn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St> where
F: FnMut(U) -> St,
St: Stream<Item = Self::SinkItem, Error = Self::SinkError>,
fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St> where
F: FnMut(U) -> St,
St: Stream<Item = Self::SinkItem, Error = Self::SinkError>,
Composes a function in front of the sink. Read more
sourcefn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::SinkError) -> E,
fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::SinkError) -> E,
Transforms the error returned by the sink.
sourcefn sink_from_err<E>(self) -> SinkFromErr<Self, E> where
E: From<Self::SinkError>,
fn sink_from_err<E>(self) -> SinkFromErr<Self, E> where
E: From<Self::SinkError>,
Map this sink’s error to any error implementing From
for this sink’s
Error
, returning a new sink. Read more
sourcefn buffer(self, amt: usize) -> Buffer<Self>
fn buffer(self, amt: usize) -> Buffer<Self>
Adds a fixed-size buffer to the current sink. Read more
sourcefn fanout<S>(self, other: S) -> Fanout<Self, S> where
S: Sink<SinkItem = Self::SinkItem, SinkError = Self::SinkError>,
Self::SinkItem: Clone,
fn fanout<S>(self, other: S) -> Fanout<Self, S> where
S: Sink<SinkItem = Self::SinkItem, SinkError = Self::SinkError>,
Self::SinkItem: Clone,
Fanout items to multiple sinks. Read more
sourcefn flush(self) -> Flush<Self>
fn flush(self) -> Flush<Self>
A future that completes when the sink has finished processing all pending requests. Read more
Auto Trait Implementations
impl<T, Item> RefUnwindSafe for CompatSink<T, Item> where
T: RefUnwindSafe,
impl<T, Item> Send for CompatSink<T, Item> where
T: Send,
impl<T, Item> Sync for CompatSink<T, Item> where
T: Sync,
impl<T, Item> Unpin for CompatSink<T, Item> where
T: Unpin,
impl<T, Item> UnwindSafe for CompatSink<T, Item> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Si> Sink01CompatExt for Si where
Si: Sink,
impl<Si> Sink01CompatExt for Si where
Si: Sink,
sourcefn sink_compat(self) -> Compat01As03Sink<Self, Self::SinkItem>
fn sink_compat(self) -> Compat01As03Sink<Self, Self::SinkItem>
Converts a futures 0.1
Sink<SinkItem = T, SinkError = E>
into a futures 0.3
Sink<T, Error = E>
. Read more