rust-managed/src/lib.rs

20 lines
563 B
Rust
Raw Normal View History

2017-01-08 02:28:51 +08:00
#![no_std]
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
#![cfg_attr(all(feature = "collections", not(feature = "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.
#[cfg(feature = "std")]
2017-01-08 02:28:51 +08:00
extern crate std;
#[cfg(all(feature = "alloc", not(feature = "std")))]
2017-01-08 02:28:51 +08:00
extern crate alloc;
#[cfg(all(feature = "collections", not(feature = "std")))]
2017-01-08 02:28:51 +08:00
extern crate collections;
mod object;
mod slice;
pub use object::Managed;
pub use slice::ManagedSlice;