some docs

This commit is contained in:
nora 2022-04-04 16:32:32 +02:00
parent 14e7443532
commit 2eddd0949d

View file

@ -9,7 +9,18 @@
//! * The trait [`StuffingStrategy`] //! * The trait [`StuffingStrategy`]
//! * The trait [`Backend`] //! * The trait [`Backend`]
//! //!
//! //! [`StuffedPtr`] is the main type of this crate. You it's a type whose size depends on the
//! choice of [`Backend`] (defaults to `usize`, `u64` and `u128` are also possible). It can store a
//! pointer or some extra data, so you can imagine it being
//! ```rust
//! enum StuffedPtr<T, E> {
//! Ptr(*mut T),
//! Extra(E),
//! }
//! ```
//! except that the extra data is bitstuffed into the pointer. You can chose any arbitrary bitstuffing
//! depending on the [`StuffingStrategy`], an unsafe trait that governs how the extra data
//! (or the pointer itself) will be packed into the backend.
mod backend; mod backend;
mod strategy; mod strategy;