Struct arena::TypedArena
[−]
[src]
pub struct TypedArena<T> { /* fields omitted */ }🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An arena that can hold objects of only one type.
Methods
impl<T> TypedArena<T>[src]
pub fn new() -> TypedArena<T>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Creates a new TypedArena.
pub fn alloc(&self, object: T) -> &mut T[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Allocates an object in the TypedArena, returning a reference to it.
pub fn alloc_slice(&self, slice: &[T]) -> &mut [T] where
T: Copy, [src]
T: Copy,
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Allocates a slice of objects that are copy into the TypedArena, returning a mutable
reference to it. Will panic if passed a zero-sized types.
Panics: - Zero-sized types - Zero-length slices
pub fn clear(&mut self)[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Clears the arena. Deallocates all but the longest chunk which may be reused.