|
|
|
@ -27,7 +27,9 @@ mod chain;
|
|
|
|
|
mod cloned;
|
|
|
|
|
mod cmp;
|
|
|
|
|
mod copied;
|
|
|
|
|
mod count;
|
|
|
|
|
mod cycle;
|
|
|
|
|
mod delay;
|
|
|
|
|
mod enumerate;
|
|
|
|
|
mod eq;
|
|
|
|
|
mod filter;
|
|
|
|
@ -47,6 +49,7 @@ mod map;
|
|
|
|
|
mod max;
|
|
|
|
|
mod max_by;
|
|
|
|
|
mod max_by_key;
|
|
|
|
|
mod merge;
|
|
|
|
|
mod min;
|
|
|
|
|
mod min_by;
|
|
|
|
|
mod min_by_key;
|
|
|
|
@ -61,13 +64,17 @@ mod skip_while;
|
|
|
|
|
mod step_by;
|
|
|
|
|
mod take;
|
|
|
|
|
mod take_while;
|
|
|
|
|
mod throttle;
|
|
|
|
|
mod timeout;
|
|
|
|
|
mod try_fold;
|
|
|
|
|
mod try_for_each;
|
|
|
|
|
mod unzip;
|
|
|
|
|
mod zip;
|
|
|
|
|
|
|
|
|
|
use all::AllFuture;
|
|
|
|
|
use any::AnyFuture;
|
|
|
|
|
use cmp::CmpFuture;
|
|
|
|
|
use count::CountFuture;
|
|
|
|
|
use cycle::Cycle;
|
|
|
|
|
use enumerate::Enumerate;
|
|
|
|
|
use eq::EqFuture;
|
|
|
|
@ -94,53 +101,48 @@ use partial_cmp::PartialCmpFuture;
|
|
|
|
|
use position::PositionFuture;
|
|
|
|
|
use try_fold::TryFoldFuture;
|
|
|
|
|
use try_for_each::TryForEachFuture;
|
|
|
|
|
use unzip::UnzipFuture;
|
|
|
|
|
|
|
|
|
|
pub use chain::Chain;
|
|
|
|
|
pub use cloned::Cloned;
|
|
|
|
|
pub use copied::Copied;
|
|
|
|
|
pub use delay::Delay;
|
|
|
|
|
pub use filter::Filter;
|
|
|
|
|
pub use fuse::Fuse;
|
|
|
|
|
pub use inspect::Inspect;
|
|
|
|
|
pub use map::Map;
|
|
|
|
|
pub use merge::Merge;
|
|
|
|
|
pub use scan::Scan;
|
|
|
|
|
pub use skip::Skip;
|
|
|
|
|
pub use skip_while::SkipWhile;
|
|
|
|
|
pub use step_by::StepBy;
|
|
|
|
|
pub use take::Take;
|
|
|
|
|
pub use take_while::TakeWhile;
|
|
|
|
|
pub use throttle::Throttle;
|
|
|
|
|
pub use timeout::{Timeout, TimeoutError};
|
|
|
|
|
pub use zip::Zip;
|
|
|
|
|
|
|
|
|
|
use core::cmp::Ordering;
|
|
|
|
|
use core::future::Future;
|
|
|
|
|
use core::pin::Pin;
|
|
|
|
|
use core::time::Duration;
|
|
|
|
|
|
|
|
|
|
cfg_unstable! {
|
|
|
|
|
use core::future::Future;
|
|
|
|
|
use core::pin::Pin;
|
|
|
|
|
use core::time::Duration;
|
|
|
|
|
use crate::stream::{Product, Sum};
|
|
|
|
|
|
|
|
|
|
cfg_unstable! {
|
|
|
|
|
use crate::stream::FromStream;
|
|
|
|
|
use crate::stream::into_stream::IntoStream;
|
|
|
|
|
use crate::stream::{FromStream, Product, Sum};
|
|
|
|
|
use crate::stream::Extend;
|
|
|
|
|
|
|
|
|
|
use count::CountFuture;
|
|
|
|
|
use partition::PartitionFuture;
|
|
|
|
|
use unzip::UnzipFuture;
|
|
|
|
|
|
|
|
|
|
pub use merge::Merge;
|
|
|
|
|
pub use flatten::Flatten;
|
|
|
|
|
pub use flat_map::FlatMap;
|
|
|
|
|
pub use timeout::{TimeoutError, Timeout};
|
|
|
|
|
pub use throttle::Throttle;
|
|
|
|
|
pub use delay::Delay;
|
|
|
|
|
|
|
|
|
|
mod count;
|
|
|
|
|
mod merge;
|
|
|
|
|
|
|
|
|
|
mod flatten;
|
|
|
|
|
mod flat_map;
|
|
|
|
|
mod partition;
|
|
|
|
|
mod timeout;
|
|
|
|
|
mod throttle;
|
|
|
|
|
mod delay;
|
|
|
|
|
mod unzip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extension_trait! {
|
|
|
|
@ -355,8 +357,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn throttle(self, d: Duration) -> Throttle<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -598,8 +598,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(any(feature = "unstable", feature = "docs"))]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn delay(self, dur: std::time::Duration) -> Delay<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -1511,8 +1509,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn by_ref(&mut self) -> &mut Self {
|
|
|
|
|
self
|
|
|
|
|
}
|
|
|
|
@ -1656,8 +1652,6 @@ extension_trait! {
|
|
|
|
|
# Ok(()) }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(any(feature = "unstable", feature = "docs"))]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn timeout(self, dur: Duration) -> Timeout<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Stream + Sized,
|
|
|
|
@ -1822,8 +1816,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn unzip<A, B, FromA, FromB>(self) -> impl Future<Output = (FromA, FromB)> [UnzipFuture<Self, FromA, FromB>]
|
|
|
|
|
where
|
|
|
|
|
FromA: Default + Extend<A>,
|
|
|
|
@ -1921,8 +1913,6 @@ extension_trait! {
|
|
|
|
|
# });
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn merge<U>(self, other: U) -> Merge<Self, U>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -2068,8 +2058,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn count(self) -> impl Future<Output = usize> [CountFuture<Self>]
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -2330,8 +2318,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn sum<'a, S>(
|
|
|
|
|
self,
|
|
|
|
|
) -> impl Future<Output = S> + 'a [Pin<Box<dyn Future<Output = S> + 'a>>]
|
|
|
|
@ -2376,8 +2362,6 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "unstable")]
|
|
|
|
|
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
|
|
|
fn product<'a, P>(
|
|
|
|
|
self,
|
|
|
|
|
) -> impl Future<Output = P> + 'a [Pin<Box<dyn Future<Output = P> + 'a>>]
|
|
|
|
|