[][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.

Implementations

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> 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]

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

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]

Auto Trait Implementations

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

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

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

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

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.