Trait wyz::comu::Referential

source ·
pub trait Referential<'a>: Sealed {
    type Ref: 'a + Deref;

    unsafe fn to_ref(self) -> Self::Ref;
    fn from_ref(this: Self::Ref) -> Self;
}
Expand description

Allows an Address to produce an ordinary reference.

Required Associated Types§

The created reference type. Must be one of &T or &mut T.

Required Methods§

Converts the Address to a reference.

Safety

The caller is responsible for ensuring that the memory location that the Address describes contains an initialized value, and that the produced reference abides by the Rust &/&mut exclusion rules.

Converts a reference back into an Address.

Implementors§