Trait Zonbi

Source
pub unsafe trait Zonbi<'life>: 'life {
    type Casted: Sized + Zonbi<'life>;

    // Required methods
    fn zonbi_id() -> ZonbiId;
    unsafe fn zonbify(self) -> Self::Casted;
    unsafe fn zonbify_ref(&self) -> &Self::Casted;
    unsafe fn zonbify_mut(&mut self) -> &mut Self::Casted;
}
Expand description

A trait to make a 'life-lifetimed version of a type.

It is unsafe to implement because we can’t assure that the Casted associated type is the “same” (ignoring lifetimes) as the implementor.

Required Associated Types§

Source

type Casted: Sized + Zonbi<'life>

A version of this type where all lifetimes are replaced with 'life so it lives for 'life.

Required Methods§

Source

fn zonbi_id() -> ZonbiId

Returns the ZonbiId of this type.

Source

unsafe fn zonbify(self) -> Self::Casted

Source

unsafe fn zonbify_ref(&self) -> &Self::Casted

Source

unsafe fn zonbify_mut(&mut self) -> &mut Self::Casted

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§