[−][src]Struct light_arena::Allocator
The allocator provides exclusive access to the memory arena, allowing for allocation of objects in the arena.
Objects allocated by an allocated cannot outlive it, upon destruction
of the allocator the memory space it requested will be made available
again. Drops of allocated objects are not called, only
types which are Sized + Copy
can be safely stored.
Methods
impl<'a> Allocator<'a>
[src]
pub fn alloc_slice<T: Sized + Copy>(&self, len: usize) -> &mut [T]
[src]
Get a dynamically sized slice of data from the allocator. The contents of the slice will be unintialized.
pub fn alloc<T: Sized + Copy>(&self, object: T) -> &mut T
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> Send for Allocator<'a>
impl<'a> !Sync for Allocator<'a>
impl<'a> Unpin for Allocator<'a>
impl<'a> !UnwindSafe for Allocator<'a>
impl<'a> !RefUnwindSafe for Allocator<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,