sized/
lib.rs

1//! # Sized
2//!
3//! ***Sized*** is a Rust crate that provides support for using Dynamically
4//! Sized Types (DSTs) in a heapless environment. DSTs are a powerful feature of
5//! Rust programming language, but they require a heap for allocation, which is
6//! not available on some embedded systems. With "heapless-dst", you can take
7//! advantage of DSTs even on these resource-constrained systems, as it provides
8//! an implementation of DSTs without using the heap. The crate uses a
9//! pre-allocated buffer to store the data and provides a safe API for dynamic
10//! resizing and manipulation of the data, so you can use DSTs with confidence
11//! in your heapless system.
12//!
13//! This crate currently require nightly rust with and the `coerce_unsized`,
14//! `ptr_metadata` and `unsize` feature. In addition of those, to make the
15//! `SizedBox::new` function `const`, the features `const_mut_refs`,
16//! `const_maybe_uninit_as_mut_ptr`, `const_ptr_write` are required.
17//! `inline_const` is required to force a const context and verify the size at
18//! compile time.
19
20#![no_std]
21#![feature(ptr_metadata)]
22#![feature(unsize)]
23#![feature(coerce_unsized)]
24#![feature(const_mut_refs)]
25#![feature(const_maybe_uninit_as_mut_ptr)]
26#![feature(const_ptr_write)]
27#![feature(inline_const)]
28
29pub mod boxed;
30
31pub use boxed::SizedBox;