Crate constmuck[][src]

Expand description

WORK IN PROGRESS

Re-exports

pub use bytemuck;
pub use bytemuck::Pod;
pub use bytemuck::PodCastError;
pub use bytemuck::TransparentWrapper;
pub use bytemuck::Zeroable;

Modules

For copying values in generic contexts.

Functions for safely transmuting types with a TransmutableInto parameter.

Functions for wrapping/peeling types that implement TransparentWrapper

Macros

For constructing Impls* types (values that represent trait bounds).

Constructs an ImplsTransparentWrapper,

Maps the bound field of a TypeSize

Constructs a TypeSize.

Structs

Encodes a T: Copy bound as a value, avoids requiring (unstable as of 2021) trait bounds in const fns.

Encodes a T:Pod bound as a value, avoids requiring (unstable as of 2021) trait bounds in const fns.

Encodes a T:TransparentWrapper bound as a value, avoids requiring (unstable as of 2021) trait bounds in const fns.

Encodes a T:Zeroable bound as a value, avoids requiring (unstable as of 2021) trait bounds in const fns.

Marker type which guarantees that Fro is safely transmutable into To, both by value and by reference (and other pointer types).

For passing a type along with its size, constructible with the type_size macro.

Traits

For constructing Impls* types (values that represent trait bounds), and tuples of them.

Functions

Casts &T to &[u8; SIZE]

For casting T into U

Cast a &T to &U

Casts &[T] to &[U]

For casting T into U

Cast a &T to &U

Casts &[T] to &[U]

For safely getting a std::mem::zeroed T.

For safely getting a std::mem::zeroed [T; N].