[][src]Module bytemuck::allocation

Stuff to boost things in the alloc crate.

  • You must enable the extern_crate_alloc feature of bytemuck or you will not be able to use this module!

Functions

cast_box

As try_cast_box, but unwraps for you.

cast_vec

As try_cast_vec, but unwraps for you.

pod_collect_to_vec

This "collects" a slice of pod data into a vec of a different pod type.

try_cast_box

Attempts to cast the content type of a Box.

try_cast_vec

Attempts to cast the content type of a Vec.

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.

zeroed_box

As try_zeroed_box, but unwraps for you.

zeroed_slice_box

As try_zeroed_slice_box, but unwraps for you.