1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Experiment with pinning self-referential structs.
#![feature(fundamental, optin_builtin_traits, coerce_unsized, unsize)]
#![deny(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(feature = "std")]
extern crate core;

mod stack;
mod pin;
mod pin_mut;
#[cfg(feature = "std")]
mod pin_box;

pub use stack::{pinned, StackPinned};
pub use pin::Pin;
pub use pin_mut::PinMut;
#[cfg(feature = "std")]
pub use pin_box::PinBox;

/// The `Unpin` auto trait means that it is safe to move out of a `Pin`
/// reference to this type.
///
/// It is not implemented by self-referential types.
pub unsafe auto trait Unpin { }