Expand description
Stuff to boost things in the alloc crate.
- 
You must enable the
extern_crate_allocfeature ofbytemuckor you will not be able to use this module! This is generally done by adding the feature to the dependency in Cargo.toml like so:bytemuck = { version = "VERSION_YOU_ARE_USING", features = ["extern_crate_alloc"]} 
Modules§
- sealed 🔒
 
Structs§
- BoxBytes
 - As 
Box<[u8]>, but remembers the original alignment. 
Traits§
- Transparent
Wrapper Alloc  - An extension trait for 
TransparentWrapperand alloc types. 
Functions§
- box_
bytes_ of  - Re-interprets 
Box<T>asBoxBytes. - cast_
arc  - As 
try_cast_arc, but unwraps for you. - cast_
box  - As 
try_cast_box, but unwraps for you. - cast_rc
 - As 
try_cast_rc, but unwraps for you. - cast_
slice_ arc  - As 
try_cast_slice_arc, but unwraps for you. - cast_
slice_ box  - As 
try_cast_slice_box, but unwraps for you. - cast_
slice_ rc  - As 
try_cast_slice_rc, but unwraps for you. - cast_
vec  - As 
try_cast_vec, but unwraps for you. - from_
box_ bytes  - Re-interprets 
BoxBytesasBox<T>. - pod_
collect_ to_ vec  - This “collects” a slice of pod data into a vec of a different pod type.
 - try_
cast_ arc  - Attempts to cast the content type of a 
Arc. - try_
cast_ box  - Attempts to cast the content type of a 
Box. - try_
cast_ rc  - Attempts to cast the content type of a 
Rc. - try_
cast_ slice_ arc  - Attempts to cast the content type of a 
Arc<[T]>. - try_
cast_ slice_ box  - Attempts to cast the content type of a 
Box<[T]>. - try_
cast_ slice_ rc  - Attempts to cast the content type of a 
Rc<[T]>. - try_
cast_ vec  - Attempts to cast the content type of a 
Vec. - try_
from_ box_ bytes  - Re-interprets 
BoxBytesasBox<T>. - try_
zeroed_ box  - Allocates a 
Box<T>with all of the contents being zeroed out. - try_
zeroed_ slice_ box  - Allocates a 
Box<[T]>with all contents being zeroed out. - try_
zeroed_ vec  - Allocates a 
Vec<T>of length and capacity exactly equal tolengthand all elements zeroed. - zeroed_
box  - As 
try_zeroed_box, but unwraps for you. - zeroed_
slice_ box  - As 
try_zeroed_slice_box, but unwraps for you. - zeroed_
vec  - As 
try_zeroed_vecbut unwraps for you