Struct rustc_arena::DropArena[][src]

pub struct DropArena {
    destructors: RefCell<Vec<DropType>>,
    arena: DroplessArena,
}
Expand description

An arena which can be used to allocate any type.

Safety

Allocating in this arena is unsafe since the type system doesn’t know which types it contains. In order to allocate safely, you must store a PhantomData<T> alongside this arena for each type T you allocate.

Fields

destructors: RefCell<Vec<DropType>>

A list of destructors to run when the arena drops. Ordered so destructors gets dropped before the arena since its destructor can reference memory in the arena.

arena: DroplessArena

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 80 bytes