[−][src]Trait futures::prelude::Sink
A Sink
is a value into which other values can be sent, asynchronously.
Basic examples of sinks include the sending side of:
- Channels
- Sockets
- Pipes
In addition to such "primitive" sinks, it's typical to layer additional functionality, such as buffering, on top of an existing sink.
Sending to a sink is "asynchronous" in the sense that the value may not be sent in its entirety immediately. Instead, values are sent in a two-phase way: first by initiating a send, and then by polling for completion. This two-phase setup is analogous to buffered writing in synchronous code, where writes often succeed immediately, but internally are buffered and are actually written only upon flushing.
In addition, the Sink
may be full, in which case it is not even possible
to start the sending process.
As with Future
and Stream
, the Sink
trait is built from a few core
required methods, and a host of default methods for working in a
higher-level way. The Sink::send_all
combinator is of particular
importance: you can use it to send an entire stream to a sink, which is
the simplest way to ultimately consume a stream.
Associated Types
type SinkItem
The type of value that the sink accepts.
type SinkError
The type of value produced by the sink when an error occurs.
Required Methods
fn poll_ready(
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
Attempts to prepare the Sink
to receive a value.
This method must be called and return Ok(Poll::Ready(()))
prior to
each call to start_send
.
This method returns Poll::Ready
once the underlying sink is ready to
receive data. If this method returns Async::Pending
, the current task
is registered to be notified (via lw.waker()
) when poll_ready
should be called again.
In most cases, if the sink encounters an error, the sink will permanently be unable to receive items.
fn start_send(
self: Pin<&mut Self>,
item: Self::SinkItem
) -> Result<(), Self::SinkError>
self: Pin<&mut Self>,
item: Self::SinkItem
) -> Result<(), Self::SinkError>
Begin the process of sending a value to the sink.
Each call to this function must be proceeded by a successful call to
poll_ready
which returned Ok(Poll::Ready(()))
.
As the name suggests, this method only begins the process of sending
the item. If the sink employs buffering, the item isn't fully processed
until the buffer is fully flushed. Since sinks are designed to work with
asynchronous I/O, the process of actually writing out the data to an
underlying object takes place asynchronously. You must use
poll_flush
or poll_close
in order to guarantee completion of a
send.
Implementations of poll_ready
and start_send
will usually involve
flushing behind the scenes in order to make room for new messages.
It is only necessary to call poll_flush
if you need to guarantee that
all of the items placed into the Sink
have been sent.
In most cases, if the sink encounters an error, the sink will permanently be unable to receive items.
fn poll_flush(
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
Flush any remaining output from this sink.
Returns Ok(Poll::Ready(()))
when no buffered items remain. If this
value is returned then it is guaranteed that all previous values sent
via start_send
have been flushed.
Returns Ok(Async::Pending)
if there is more work left to do, in which
case the current task is scheduled (via lw.waker()
) to wake up when
poll_flush
should be called again.
In most cases, if the sink encounters an error, the sink will permanently be unable to receive items.
fn poll_close(
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
self: Pin<&mut Self>,
lw: &LocalWaker
) -> Poll<Result<(), Self::SinkError>>
Flush any remaining output and close this sink, if necessary.
Returns Ok(Poll::Ready(()))
when no buffered items remain and the sink
has been successfully closed.
Returns Ok(Async::Pending)
if there is more work left to do, in which
case the current task is scheduled (via lw.waker()
) to wake up when
poll_close
should be called again.
If this function encounters an error, the sink should be considered to
have failed permanently, and no more Sink
methods should be called.
Implementations on Foreign Types
impl<Si, U, St, F> Sink for WithFlatMap<Si, U, St, F> where
F: FnMut(U) -> St,
Si: Sink,
St: Stream<Item = Result<<Si as Sink>::SinkItem, <Si as Sink>::SinkError>>,
[src]
impl<Si, U, St, F> Sink for WithFlatMap<Si, U, St, F> where
F: FnMut(U) -> St,
Si: Sink,
St: Stream<Item = Result<<Si as Sink>::SinkItem, <Si as Sink>::SinkError>>,
type SinkItem = U
type SinkError = <Si as Sink>::SinkError
fn poll_ready(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
item: <WithFlatMap<Si, U, St, F> as Sink>::SinkItem
) -> Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
item: <WithFlatMap<Si, U, St, F> as Sink>::SinkItem
) -> Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut WithFlatMap<Si, U, St, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <WithFlatMap<Si, U, St, F> as Sink>::SinkError>>
impl<'a, S> Sink for &'a mut S where
S: Sink + Unpin + ?Sized,
[src]
impl<'a, S> Sink for &'a mut S where
S: Sink + Unpin + ?Sized,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
fn start_send(
self: Pin<&mut &'a mut S>,
item: <&'a mut S as Sink>::SinkItem
) -> Result<(), <&'a mut S as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut &'a mut S>,
item: <&'a mut S as Sink>::SinkItem
) -> Result<(), <&'a mut S as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut &'a mut S>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a mut S as Sink>::SinkError>>
impl<S> Sink for Box<S> where
S: Sink + Unpin + ?Sized,
[src]
impl<S> Sink for Box<S> where
S: Sink + Unpin + ?Sized,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Box<S>>,
item: <Box<S> as Sink>::SinkItem
) -> Result<(), <Box<S> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Box<S>>,
item: <Box<S> as Sink>::SinkItem
) -> Result<(), <Box<S> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Box<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Box<S> as Sink>::SinkError>>
impl<T> Sink for Vec<T>
[src]
impl<T> Sink for Vec<T>
type SinkItem = T
type SinkError = VecSinkError
fn poll_ready(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Vec<T>>,
item: <Vec<T> as Sink>::SinkItem
) -> Result<(), <Vec<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Vec<T>>,
item: <Vec<T> as Sink>::SinkItem
) -> Result<(), <Vec<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Vec<T>>,
&LocalWaker
) -> Poll<Result<(), <Vec<T> as Sink>::SinkError>>
impl<T> Sink for VecDeque<T>
[src]
impl<T> Sink for VecDeque<T>
type SinkItem = T
type SinkError = VecSinkError
fn poll_ready(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut VecDeque<T>>,
item: <VecDeque<T> as Sink>::SinkItem
) -> Result<(), <VecDeque<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut VecDeque<T>>,
item: <VecDeque<T> as Sink>::SinkItem
) -> Result<(), <VecDeque<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut VecDeque<T>>,
&LocalWaker
) -> Poll<Result<(), <VecDeque<T> as Sink>::SinkError>>
impl<'a, S> Sink for Pin<&'a mut S> where
S: Sink + ?Sized,
[src]
impl<'a, S> Sink for Pin<&'a mut S> where
S: Sink + ?Sized,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Pin<&'a mut S>>,
item: <Pin<&'a mut S> as Sink>::SinkItem
) -> Result<(), <Pin<&'a mut S> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Pin<&'a mut S>>,
item: <Pin<&'a mut S> as Sink>::SinkItem
) -> Result<(), <Pin<&'a mut S> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Pin<&'a mut S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Pin<&'a mut S> as Sink>::SinkError>>
impl<A, B> Sink for Either<A, B> where
A: Sink,
B: Sink<SinkItem = <A as Sink>::SinkItem, SinkError = <A as Sink>::SinkError>,
[src]
impl<A, B> Sink for Either<A, B> where
A: Sink,
B: Sink<SinkItem = <A as Sink>::SinkItem, SinkError = <A as Sink>::SinkError>,
type SinkItem = <A as Sink>::SinkItem
type SinkError = <A as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Either<A, B>>,
item: <Either<A, B> as Sink>::SinkItem
) -> Result<(), <Either<A, B> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Either<A, B>>,
item: <Either<A, B> as Sink>::SinkItem
) -> Result<(), <Either<A, B> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Either<A, B>>,
lw: &LocalWaker
) -> Poll<Result<(), <Either<A, B> as Sink>::SinkError>>
Implementors
impl<'a, T> Sink for &'a UnboundedSender<T>
[src]
impl<'a, T> Sink for &'a UnboundedSender<T>
type SinkItem = T
type SinkError = SendError
fn poll_ready(
self: Pin<&mut &'a UnboundedSender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut &'a UnboundedSender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut &'a UnboundedSender<T>>,
msg: T
) -> Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut &'a UnboundedSender<T>>,
msg: T
) -> Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut &'a UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut &'a UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut &'a UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut &'a UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <&'a UnboundedSender<T> as Sink>::SinkError>>
impl<Fut, Si> Sink for FlattenSink<Fut, Si> where
Fut: TryFuture<Ok = Si>,
Si: Sink<SinkError = <Fut as TryFuture>::Error>,
[src]
impl<Fut, Si> Sink for FlattenSink<Fut, Si> where
Fut: TryFuture<Ok = Si>,
Si: Sink<SinkError = <Fut as TryFuture>::Error>,
type SinkItem = <Si as Sink>::SinkItem
type SinkError = <Si as Sink>::SinkError
fn poll_ready(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut FlattenSink<Fut, Si>>,
item: <FlattenSink<Fut, Si> as Sink>::SinkItem
) -> Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut FlattenSink<Fut, Si>>,
item: <FlattenSink<Fut, Si> as Sink>::SinkItem
) -> Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut FlattenSink<Fut, Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <FlattenSink<Fut, Si> as Sink>::SinkError>>
impl<S> Sink for BufferUnordered<S> where
S: Stream + Sink,
<S as Stream>::Item: Future,
[src]
impl<S> Sink for BufferUnordered<S> where
S: Stream + Sink,
<S as Stream>::Item: Future,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut BufferUnordered<S>>,
item: <BufferUnordered<S> as Sink>::SinkItem
) -> Result<(), <BufferUnordered<S> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut BufferUnordered<S>>,
item: <BufferUnordered<S> as Sink>::SinkItem
) -> Result<(), <BufferUnordered<S> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut BufferUnordered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <BufferUnordered<S> as Sink>::SinkError>>
impl<S> Sink for Buffered<S> where
S: Stream + Sink,
<S as Stream>::Item: Future,
[src]
impl<S> Sink for Buffered<S> where
S: Stream + Sink,
<S as Stream>::Item: Future,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Buffered<S>>,
item: <Buffered<S> as Sink>::SinkItem
) -> Result<(), <Buffered<S> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Buffered<S>>,
item: <Buffered<S> as Sink>::SinkItem
) -> Result<(), <Buffered<S> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Buffered<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffered<S> as Sink>::SinkError>>
impl<S> Sink for Fuse<S> where
S: Stream + Sink,
[src]
impl<S> Sink for Fuse<S> where
S: Stream + Sink,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Fuse<S>>,
item: <Fuse<S> as Sink>::SinkItem
) -> Result<(), <Fuse<S> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Fuse<S>>,
item: <Fuse<S> as Sink>::SinkItem
) -> Result<(), <Fuse<S> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Fuse<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fuse<S> as Sink>::SinkError>>
impl<S> Sink for SplitSink<S> where
S: Sink,
[src]
impl<S> Sink for SplitSink<S> where
S: Sink,
type SinkItem = <S as Sink>::SinkItem
type SinkError = <S as Sink>::SinkError
fn poll_ready(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
fn start_send(
self: Pin<&mut SplitSink<S>>,
item: <S as Sink>::SinkItem
) -> Result<(), <S as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut SplitSink<S>>,
item: <S as Sink>::SinkItem
) -> Result<(), <S as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut SplitSink<S>>,
lw: &LocalWaker
) -> Poll<Result<(), <S as Sink>::SinkError>>
impl<Si> Sink for Buffer<Si> where
Si: Sink,
[src]
impl<Si> Sink for Buffer<Si> where
Si: Sink,
type SinkItem = <Si as Sink>::SinkItem
type SinkError = <Si as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Buffer<Si>>,
item: <Buffer<Si> as Sink>::SinkItem
) -> Result<(), <Buffer<Si> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Buffer<Si>>,
item: <Buffer<Si> as Sink>::SinkItem
) -> Result<(), <Buffer<Si> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Buffer<Si>>,
lw: &LocalWaker
) -> Poll<Result<(), <Buffer<Si> as Sink>::SinkError>>
impl<Si, E> Sink for SinkErrInto<Si, E> where
Si: Sink,
<Si as Sink>::SinkError: Into<E>,
[src]
impl<Si, E> Sink for SinkErrInto<Si, E> where
Si: Sink,
<Si as Sink>::SinkError: Into<E>,
type SinkItem = <Si as Sink>::SinkItem
type SinkError = E
fn poll_ready(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut SinkErrInto<Si, E>>,
item: <SinkErrInto<Si, E> as Sink>::SinkItem
) -> Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut SinkErrInto<Si, E>>,
item: <SinkErrInto<Si, E> as Sink>::SinkItem
) -> Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut SinkErrInto<Si, E>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkErrInto<Si, E> as Sink>::SinkError>>
impl<Si, F, E> Sink for SinkMapErr<Si, F> where
F: FnOnce(<Si as Sink>::SinkError) -> E,
Si: Sink,
[src]
impl<Si, F, E> Sink for SinkMapErr<Si, F> where
F: FnOnce(<Si as Sink>::SinkError) -> E,
Si: Sink,
type SinkItem = <Si as Sink>::SinkItem
type SinkError = E
fn poll_ready(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut SinkMapErr<Si, F>>,
item: <SinkMapErr<Si, F> as Sink>::SinkItem
) -> Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut SinkMapErr<Si, F>>,
item: <SinkMapErr<Si, F> as Sink>::SinkItem
) -> Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut SinkMapErr<Si, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <SinkMapErr<Si, F> as Sink>::SinkError>>
impl<Si, U, Fut, F, E> Sink for With<Si, U, Fut, F> where
E: From<<Si as Sink>::SinkError>,
F: FnMut(U) -> Fut,
Fut: Future<Output = Result<<Si as Sink>::SinkItem, E>>,
Si: Sink,
[src]
impl<Si, U, Fut, F, E> Sink for With<Si, U, Fut, F> where
E: From<<Si as Sink>::SinkError>,
F: FnMut(U) -> Fut,
Fut: Future<Output = Result<<Si as Sink>::SinkItem, E>>,
Si: Sink,
type SinkItem = U
type SinkError = E
fn poll_ready(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut With<Si, U, Fut, F>>,
item: <With<Si, U, Fut, F> as Sink>::SinkItem
) -> Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut With<Si, U, Fut, F>>,
item: <With<Si, U, Fut, F> as Sink>::SinkItem
) -> Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut With<Si, U, Fut, F>>,
lw: &LocalWaker
) -> Poll<Result<(), <With<Si, U, Fut, F> as Sink>::SinkError>>
impl<Si1, Si2> Sink for Fanout<Si1, Si2> where
Si1: Sink,
Si2: Sink<SinkItem = <Si1 as Sink>::SinkItem, SinkError = <Si1 as Sink>::SinkError>,
<Si1 as Sink>::SinkItem: Clone,
[src]
impl<Si1, Si2> Sink for Fanout<Si1, Si2> where
Si1: Sink,
Si2: Sink<SinkItem = <Si1 as Sink>::SinkItem, SinkError = <Si1 as Sink>::SinkError>,
<Si1 as Sink>::SinkItem: Clone,
type SinkItem = <Si1 as Sink>::SinkItem
type SinkError = <Si1 as Sink>::SinkError
fn poll_ready(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Fanout<Si1, Si2>>,
item: <Fanout<Si1, Si2> as Sink>::SinkItem
) -> Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Fanout<Si1, Si2>>,
item: <Fanout<Si1, Si2> as Sink>::SinkItem
) -> Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Fanout<Si1, Si2>>,
lw: &LocalWaker
) -> Poll<Result<(), <Fanout<Si1, Si2> as Sink>::SinkError>>
impl<T> Sink for Sender<T>
[src]
impl<T> Sink for Sender<T>
type SinkItem = T
type SinkError = SendError
fn poll_ready(
self: Pin<&mut Sender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Sender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Sender<T>>,
msg: T
) -> Result<(), <Sender<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Sender<T>>,
msg: T
) -> Result<(), <Sender<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Sender<T>>,
&LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Sender<T>>,
&LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Sender<T>>,
&LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Sender<T>>,
&LocalWaker
) -> Poll<Result<(), <Sender<T> as Sink>::SinkError>>
impl<T> Sink for UnboundedSender<T>
[src]
impl<T> Sink for UnboundedSender<T>
type SinkItem = T
type SinkError = SendError
fn poll_ready(
self: Pin<&mut UnboundedSender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut UnboundedSender<T>>,
lw: &LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut UnboundedSender<T>>,
msg: T
) -> Result<(), <UnboundedSender<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut UnboundedSender<T>>,
msg: T
) -> Result<(), <UnboundedSender<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut UnboundedSender<T>>,
&LocalWaker
) -> Poll<Result<(), <UnboundedSender<T> as Sink>::SinkError>>
impl<T> Sink for Drain<T>
[src]
impl<T> Sink for Drain<T>
type SinkItem = T
type SinkError = DrainError
fn poll_ready(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>
[src]
fn poll_ready(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>
fn start_send(
self: Pin<&mut Drain<T>>,
_item: <Drain<T> as Sink>::SinkItem
) -> Result<(), <Drain<T> as Sink>::SinkError>
[src]
fn start_send(
self: Pin<&mut Drain<T>>,
_item: <Drain<T> as Sink>::SinkItem
) -> Result<(), <Drain<T> as Sink>::SinkError>
fn poll_flush(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>
[src]
fn poll_flush(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>
fn poll_close(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>
[src]
fn poll_close(
self: Pin<&mut Drain<T>>,
_lw: &LocalWaker
) -> Poll<Result<(), <Drain<T> as Sink>::SinkError>>