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

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]

[src]

Construct a PooledArena.

[src]

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

[src]

Discard all vacant entries.

Trait Implementations

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]

[src]

Formats the value using the given formatter. Read more

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]

Pointer type. Read more

[src]

Insert a value into the arena. Read more

[src]

Get a reference to a contained value, without a pointer validity check.

[src]

Get a mutable reference to a contained value, without a pointer validity check. Read more

[src]

Remove a value from the arena, without a pointer validity check. Read more

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

[src]

Return true if the pointer was created from the same instance of the arena. Read more

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]

[src]

Get a reference to a contained value.

[src]

Get a mutable reference to a contained value.

[src]

Remove a value from the arena. Read more

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