red4ext_rs::types

Trait 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.

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§