File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,20 @@ pub use core::future::Future;
9
9
10
10
/// An owned dynamically typed [`Future`] for use in cases where you can't
11
11
/// statically type your result or need to add some indirection.
12
+ ///
13
+ /// This type is often created by the [`boxed`] method on [`FutureExt`]. See its documentation for more.
14
+ ///
15
+ /// [`boxed`]: https://docs.rs/futures/latest/futures/future/trait.FutureExt.html#method.boxed
16
+ /// [`FutureExt`]: https://docs.rs/futures/latest/futures/future/trait.FutureExt.html
12
17
#[ cfg( feature = "alloc" ) ]
13
18
pub type BoxFuture < ' a , T > = Pin < alloc:: boxed:: Box < dyn Future < Output = T > + Send + ' a > > ;
14
19
15
20
/// `BoxFuture`, but without the `Send` requirement.
21
+ ///
22
+ /// This type is often created by the [`boxed_local`] method on [`FutureExt`]. See its documentation for more.
23
+ ///
24
+ /// [`boxed_local`]: https://docs.rs/futures/latest/futures/future/trait.FutureExt.html#method.boxed_local
25
+ /// [`FutureExt`]: https://docs.rs/futures/latest/futures/future/trait.FutureExt.html
16
26
#[ cfg( feature = "alloc" ) ]
17
27
pub type LocalBoxFuture < ' a , T > = Pin < alloc:: boxed:: Box < dyn Future < Output = T > + ' a > > ;
18
28
Original file line number Diff line number Diff line change @@ -6,10 +6,20 @@ use core::task::{Context, Poll};
6
6
7
7
/// An owned dynamically typed [`Stream`] for use in cases where you can't
8
8
/// statically type your result or need to add some indirection.
9
+ ///
10
+ /// This type is often created by the [`boxed`] method on [`StreamExt`]. See its documentation for more.
11
+ ///
12
+ /// [`boxed`]: https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html#method.boxed
13
+ /// [`StreamExt`]: https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html
9
14
#[ cfg( feature = "alloc" ) ]
10
15
pub type BoxStream < ' a , T > = Pin < alloc:: boxed:: Box < dyn Stream < Item = T > + Send + ' a > > ;
11
16
12
17
/// `BoxStream`, but without the `Send` requirement.
18
+ ///
19
+ /// This type is often created by the [`boxed_local`] method on [`StreamExt`]. See its documentation for more.
20
+ ///
21
+ /// [`boxed_local`]: https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html#method.boxed_local
22
+ /// [`StreamExt`]: https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html
13
23
#[ cfg( feature = "alloc" ) ]
14
24
pub type LocalBoxStream < ' a , T > = Pin < alloc:: boxed:: Box < dyn Stream < Item = T > + ' a > > ;
15
25
You can’t perform that action at this time.
0 commit comments