mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-06 04:35:32 +00:00
Merge #203
203: expose std::pin r=yoshuawuyts a=yoshuawuyts This is important when defining / calling futures, so it makes sense for us to also export this. But also given recent user feedback on the confusion on pinning, I'd like to open up the possibility to experiment with providing better pinning facilities such as [`pin-project`](https://github.com/taiki-e/pin-project) or [`pin_mut`](https://docs.rs/pin-utils/0.1.0-alpha.4/pin_utils/macro.pin_mut.html) behind flags. I'm not sure if we could, or even should. But I want to allow us to have that conversation and test things out (even if it's just in floating patches.) Thanks! Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
commit
d73e54450c
2 changed files with 10 additions and 0 deletions
|
@ -52,4 +52,8 @@ pub mod stream;
|
|||
pub mod sync;
|
||||
pub mod task;
|
||||
|
||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
||||
#[cfg(feature = "unstable")]
|
||||
pub mod pin;
|
||||
|
||||
pub(crate) mod utils;
|
||||
|
|
6
src/pin.rs
Normal file
6
src/pin.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
//! Types that pin data to its location in memory.
|
||||
//!
|
||||
//! For more documentation see [`std::pin`](https://doc.rust-lang.org/std/pin/index.html).
|
||||
|
||||
#[doc(inline)]
|
||||
pub use std::pin::Pin;
|
Loading…
Reference in a new issue