File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 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;
99
1010/// An owned dynamically typed [`Future`] for use in cases where you can't
1111/// 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
1217#[ cfg( feature = "alloc" ) ]
1318pub type BoxFuture < ' a , T > = Pin < alloc:: boxed:: Box < dyn Future < Output = T > + Send + ' a > > ;
1419
1520/// `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
1626#[ cfg( feature = "alloc" ) ]
1727pub type LocalBoxFuture < ' a , T > = Pin < alloc:: boxed:: Box < dyn Future < Output = T > + ' a > > ;
1828
Original file line number Diff line number Diff line change @@ -6,10 +6,20 @@ use core::task::{Context, Poll};
66
77/// An owned dynamically typed [`Stream`] for use in cases where you can't
88/// 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
914#[ cfg( feature = "alloc" ) ]
1015pub type BoxStream < ' a , T > = Pin < alloc:: boxed:: Box < dyn Stream < Item = T > + Send + ' a > > ;
1116
1217/// `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
1323#[ cfg( feature = "alloc" ) ]
1424pub type LocalBoxStream < ' a , T > = Pin < alloc:: boxed:: Box < dyn Stream < Item = T > + ' a > > ;
1525
You can’t perform that action at this time.
0 commit comments