Struct cl_arena::dropless_arena::DroplessArena
source · pub struct DroplessArena<'arena> { /* private fields */ }
Implementations§
source§impl<'arena> DroplessArena<'arena>
impl<'arena> DroplessArena<'arena>
pub const fn new() -> Self
sourcepub fn alloc<T>(&'arena self, value: T) -> &'arena mut T
pub fn alloc<T>(&'arena self, value: T) -> &'arena mut T
Allocates a T
in the DroplessArena, and returns a mutable reference to it.
§Panics
- Panics if T implements Drop
- Panics if T is zero-sized
sourcepub fn alloc_slice<T: Copy>(&'arena self, slice: &[T]) -> &'arena mut [T]
pub fn alloc_slice<T: Copy>(&'arena self, slice: &[T]) -> &'arena mut [T]
sourcepub fn contains_slice<T>(&self, slice: &[T]) -> bool
pub fn contains_slice<T>(&self, slice: &[T]) -> bool
Checks whether the given slice is allocated in this arena
Trait Implementations§
source§impl Default for DroplessArena<'_>
impl Default for DroplessArena<'_>
impl<'arena> Send for DroplessArena<'arena>
Auto Trait Implementations§
impl<'arena> !Freeze for DroplessArena<'arena>
impl<'arena> !RefUnwindSafe for DroplessArena<'arena>
impl<'arena> !Sync for DroplessArena<'arena>
impl<'arena> Unpin for DroplessArena<'arena>
impl<'arena> UnwindSafe for DroplessArena<'arena>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more