[][src]Struct xalloc::arena::pooled::PooledArena

pub struct PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P>,
    P: Clone + Default + PartialEq + Eq + Debug
{ /* fields omitted */ }

Adds a vacant entry pool to any memory arena for faster reallocation.

Methods

impl<T, A, P> PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P>,
    P: Clone + Default + PartialEq + Eq + Debug
[src]

pub fn new(inner: A) -> Self[src]

Construct a PooledArena.

pub fn with_capacity(inner: A, capacity: usize) -> Self[src]

Construct a PooledArena with the specified number of pre-allocated entries.

pub fn purge(&mut self)[src]

Discard all vacant entries.

Trait Implementations

impl<T, A, P> UnsafeArena<T> for PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P>,
    P: Clone + Default + PartialEq + Eq + Debug
[src]

type Ptr = A::Ptr

Pointer type. Read more

fn reserve(&mut self, _additional: usize)[src]

Reserves capacity for at least additional values to be inserted in the arena.

impl<T, A, P> UnsafeArenaWithMembershipCheck<T> for PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P> + UnsafeArenaWithMembershipCheck<Entry<T, P>>,
    P: Clone + Default + PartialEq + Eq + Debug
[src]

impl<T, A, P> Arena<T> for PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P> + Arena<Entry<T, P>>,
    P: Clone + Default + PartialEq + Eq + Debug
[src]

impl<T: Debug, A: Debug, P: Debug> Debug for PooledArena<T, A, P> where
    A: UnsafeArena<Entry<T, P>, Ptr = P>,
    P: Clone + Default + PartialEq + Eq + Debug
[src]

Auto Trait Implementations

impl<T, A, P> Send for PooledArena<T, A, P> where
    A: Send,
    P: Send,
    T: Send

impl<T, A, P> Sync for PooledArena<T, A, P> where
    A: Sync,
    P: Sync,
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.