Module std::cast

Unsafe casting functions

Functions

bump_box_refcount

Force-increment the reference count on a shared box. If used carelessly, this can leak the box.

copy_lifetime

Transforms lifetime of the second pointer to match the first.

copy_lifetime_vec

Transforms lifetime of the second pointer to match the first.

copy_mut_lifetime

Transforms lifetime of the second pointer to match the first.

forget

Move a thing into the void

transmute

Transform a value of one type into a value of another type. Both types must have the same size and alignment.

transmute_copy

Casts the value at src to U. The two types must have the same length.

transmute_immut

Coerce a mutable reference to be immutable.

transmute_immut_unsafe

Coerce an immutable reference to be mutable.

transmute_mut

Coerce an immutable reference to be mutable.

transmute_mut_region

Coerce a borrowed mutable pointer to have an arbitrary associated region.

transmute_mut_unsafe

Coerce an immutable reference to be mutable.

transmute_region

Coerce a borrowed pointer to have an arbitrary associated region.

unsafe_copy

Forces a copy of a value, even if that value is considered noncopyable.