Struct ts_mem_pool::memory_pool::MemoryPool[][src]

pub struct MemoryPool<T> { /* fields omitted */ }

Memory pool structure

Methods

impl<T: Recycle> MemoryPool<T>
[src]

Constructor, must take intial size and maximum size. The creator closure is used to initialize the mem slots

Panics

This function will panic if size > max

This function returns a memory slot from the memory pool

Panics

This function will panic if it needs to allocate more than max

This function returns a memory slot from the memory pool if size does not exceed max. returns None otherwise

Auto Trait Implementations

impl<T> !Send for MemoryPool<T>

impl<T> !Sync for MemoryPool<T>