Trait red4ext_rs::types::PoolableOps

source ·
pub trait PoolableOps: Poolable + Sized + Sealed {
    // Required methods
    fn alloc() -> Option<PoolRef<MaybeUninit<Self>>>;
    fn free(ptr: &mut PoolRef<Self>);
}
Expand description

A trait with operations for types that can be stored in a pool.

Required Methods§

source

fn alloc() -> Option<PoolRef<MaybeUninit<Self>>>

Allocates memory for Self. The resulting value must be initialized before use.

source

fn free(ptr: &mut PoolRef<Self>)

Frees memory pointed by ptr.

Object Safety§

This trait is not object safe.

Implementors§