rust-managed/src/lib.rs

20 lines
599 B
Rust
Raw Normal View History

2017-01-08 02:28:51 +08:00
#![no_std]
2017-01-08 02:40:15 +08:00
#![cfg_attr(all(feature = "use_alloc", not(feature = "use_std")), feature(alloc))]
#![cfg_attr(all(feature = "use_collections", not(feature = "use_std")), feature(collections))]
2017-01-08 02:28:51 +08:00
2017-01-08 02:49:27 +08:00
//! A library that provides a way to logically own objects, whether or not
//! heap allocation is available.
2017-01-08 02:28:51 +08:00
#[cfg(feature = "use_std")]
extern crate std;
2017-01-08 02:40:15 +08:00
#[cfg(all(feature = "use_alloc", not(feature = "use_std")))]
2017-01-08 02:28:51 +08:00
extern crate alloc;
2017-01-08 02:40:15 +08:00
#[cfg(all(feature = "use_collections", not(feature = "use_std")))]
2017-01-08 02:28:51 +08:00
extern crate collections;
mod object;
mod slice;
pub use object::Managed;
pub use slice::ManagedSlice;