CastUncheckedExt

Trait CastUncheckedExt 

Source
pub trait CastUncheckedExt<'a> {
    // Required method
    unsafe fn cast_unchecked<T>(self) -> &'a T;
}

Required Methods§

Source

unsafe fn cast_unchecked<T>(self) -> &'a T

Casts a mutable untyped heap reference ([`&void]) into a typed one.

§Safety

Horribly unsafe if T doesn’t point to an initialised instance of T.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a> CastUncheckedExt<'a> for &'a void