Crate slimmer_box
source ·Expand description
slimmer_box: A packed alternative to Box<T>
whose ‘fat’ pointer is ‘slimmer’.
SlimmerBox<T>
is the main type exposed by this crate. Detailed documentation can be found there.
Other, less frequently useful types:
CloneUnsized
: a helper trait to also allow unsized types whose contents are clone. (like[T]
andstr
) to be cloned around.SlimmerPointee
: a helper trait implemented for all sized and unsized types for which a ‘fat’ pointer might be made slimmer.
Feature flags
"std"
. Enabled by default. Disable the default features to use the crate in no_std environments.slimmer_box
does require thealloc
crate to be available."rkyv"
. Enable support for the rkyv zero-copy serialisation/deserialisation library, which is a very good match for this crate!"serde"
. Enable support for the serde serialisation/deserialisation library.
MSRV
The minimum supported Rust version of slimmer_box
is 1.58.1.
Re-exports
pub use crate::clone_unsized::CloneUnsized;
pub use crate::slim_pointee::SlimmerPointee;
Modules
Structs
- A packed alternative to
Box<T>
whose ‘fat’ pointer is ‘slimmer’.