Expand description
Asynchronous sinks.
This module contains:
-
The
Sink
trait, which allows you to asynchronously write data. -
The
SinkExt
trait, which provides adapters for chaining and composing sinks.
Structs§
- Sink for the
Sink::buffer
combinator, which buffers up to some fixed number of values when the underlying sink is unable to accept them. - Future for the
close
combinator, which polls the sink until all data has been closed. - Sink that clones incoming items and forwards them to two sinks at the same time.
- Future for the
flush
combinator, which polls the sink until all data has been flushed. - Future for the
Sink::send
combinator, which sends a value to a sink and then waits until the sink has fully flushed. - Future for the
Sink::send_all
combinator, which sends a stream of values to a sink and then waits until the sink has fully flushed those values. - A sink combinator to change the error type of a sink.
- Sink for the
Sink::sink_map_err
combinator. - Sink for the
Sink::with
combinator, chaining a computation to run prior to pushing a value into the underlying sink. - Sink for the
Sink::with_flat_map
combinator, chaining a computation that returns an iterator to run prior to pushing a value into the underlying sink
Traits§
- A
Sink
is a value into which other values can be sent, asynchronously. - An extension trait for
Sink
s that provides a variety of convenient combinator functions.