|
|
|
@ -27,9 +27,7 @@ mod chain;
|
|
|
|
|
mod cloned;
|
|
|
|
|
mod cmp;
|
|
|
|
|
mod copied;
|
|
|
|
|
mod count;
|
|
|
|
|
mod cycle;
|
|
|
|
|
mod delay;
|
|
|
|
|
mod enumerate;
|
|
|
|
|
mod eq;
|
|
|
|
|
mod filter;
|
|
|
|
@ -49,7 +47,6 @@ mod map;
|
|
|
|
|
mod max;
|
|
|
|
|
mod max_by;
|
|
|
|
|
mod max_by_key;
|
|
|
|
|
mod merge;
|
|
|
|
|
mod min;
|
|
|
|
|
mod min_by;
|
|
|
|
|
mod min_by_key;
|
|
|
|
@ -64,17 +61,13 @@ 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;
|
|
|
|
@ -101,33 +94,46 @@ 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;
|
|
|
|
|
|
|
|
|
|
use crate::stream::{Product, Sum};
|
|
|
|
|
cfg_std! {
|
|
|
|
|
use core::time::Duration;
|
|
|
|
|
use crate::stream::{Product, Sum};
|
|
|
|
|
use alloc::boxed::Box;
|
|
|
|
|
use core::future::Future;
|
|
|
|
|
use core::pin::Pin;
|
|
|
|
|
|
|
|
|
|
use unzip::UnzipFuture;
|
|
|
|
|
use count::CountFuture;
|
|
|
|
|
|
|
|
|
|
pub use throttle::Throttle;
|
|
|
|
|
pub use merge::Merge;
|
|
|
|
|
pub use delay::Delay;
|
|
|
|
|
pub use timeout::{Timeout, TimeoutError};
|
|
|
|
|
|
|
|
|
|
mod timeout;
|
|
|
|
|
mod throttle;
|
|
|
|
|
mod merge;
|
|
|
|
|
mod delay;
|
|
|
|
|
mod unzip;
|
|
|
|
|
mod count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cfg_unstable! {
|
|
|
|
|
use crate::stream::FromStream;
|
|
|
|
@ -357,6 +363,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn throttle(self, d: Duration) -> Throttle<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -598,6 +605,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn delay(self, dur: std::time::Duration) -> Delay<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -1652,6 +1660,7 @@ extension_trait! {
|
|
|
|
|
# Ok(()) }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn timeout(self, dur: Duration) -> Timeout<Self>
|
|
|
|
|
where
|
|
|
|
|
Self: Stream + Sized,
|
|
|
|
@ -1816,6 +1825,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn unzip<A, B, FromA, FromB>(self) -> impl Future<Output = (FromA, FromB)> [UnzipFuture<Self, FromA, FromB>]
|
|
|
|
|
where
|
|
|
|
|
FromA: Default + Extend<A>,
|
|
|
|
@ -1913,6 +1923,7 @@ extension_trait! {
|
|
|
|
|
# });
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn merge<U>(self, other: U) -> Merge<Self, U>
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -2058,6 +2069,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn count(self) -> impl Future<Output = usize> [CountFuture<Self>]
|
|
|
|
|
where
|
|
|
|
|
Self: Sized,
|
|
|
|
@ -2318,6 +2330,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn sum<'a, S>(
|
|
|
|
|
self,
|
|
|
|
|
) -> impl Future<Output = S> + 'a [Pin<Box<dyn Future<Output = S> + 'a>>]
|
|
|
|
@ -2362,6 +2375,7 @@ extension_trait! {
|
|
|
|
|
# }) }
|
|
|
|
|
```
|
|
|
|
|
"#]
|
|
|
|
|
#[cfg(feature = "std")]
|
|
|
|
|
fn product<'a, P>(
|
|
|
|
|
self,
|
|
|
|
|
) -> impl Future<Output = P> + 'a [Pin<Box<dyn Future<Output = P> + 'a>>]
|
|
|
|
|