pollable_map/stream/optional.rs
1use crate::optional::Optional;
2
3/// A reusable stream that is the equivalent to an `Option`.
4///
5/// By default, this future will be empty, which would return [`Poll::Pending`] when polled,
6/// but if a [`Stream`] is supplied either upon construction via [`OptionalStream::new`] or
7/// is set via [`OptionalStream::replace`], the stream could later polled once [`OptionalStream`]
8/// is polled. Once the stream is polled to completion, [`OptionalStream`] will be empty.
9#[deprecated(note = "Use Optional instead")]
10pub type OptionalStream<S> = Optional<S>;