IPolicyPtrID

Trait IPolicyPtrID 

Source
pub trait IPolicyPtrID:
    Copy
    + Eq
    + Debug {
    type ObjectT: Sized;
    type PolicyT: IAllocPolicy;

    // Required methods
    fn from_raw_ptrid(ptr: PtrID<Self::ObjectT, Self::PolicyT>) -> Self;
    fn into_raw_ptrid(self) -> PtrID<Self::ObjectT, Self::PolicyT>;

    // Provided methods
    fn deref_alloc(
        self,
        alloc: &EntityAlloc<Self::ObjectT, Self::PolicyT>,
    ) -> &Self::ObjectT { ... }
    fn deref_from_alloc_mut(
        self,
        alloc: &mut EntityAlloc<Self::ObjectT, Self::PolicyT>,
    ) -> &mut Self::ObjectT { ... }
}
Expand description

Pointer ID wrapper of allocated entities with a specialized policy

Required Associated Types§

Required Methods§

Source

fn from_raw_ptrid(ptr: PtrID<Self::ObjectT, Self::PolicyT>) -> Self

Source

fn into_raw_ptrid(self) -> PtrID<Self::ObjectT, Self::PolicyT>

Provided Methods§

Source

fn deref_alloc( self, alloc: &EntityAlloc<Self::ObjectT, Self::PolicyT>, ) -> &Self::ObjectT

Source

fn deref_from_alloc_mut( self, alloc: &mut EntityAlloc<Self::ObjectT, Self::PolicyT>, ) -> &mut Self::ObjectT

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§