pub struct AllocationContext { /* private fields */ }Expand description
A context for allocating Cairo tokens. This wrapper contains a bump allocator, which is used to allocate strings for tokens.
Implementations§
Source§impl AllocationContext
impl AllocationContext
Sourcepub fn with_capacity(size_hint: usize) -> Self
pub fn with_capacity(size_hint: usize) -> Self
Allocate a new context with pre-determined buffer size.
Trait Implementations§
Source§impl Clone for AllocationContext
impl Clone for AllocationContext
Source§fn clone(&self) -> AllocationContext
fn clone(&self) -> AllocationContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AllocationContext
impl !RefUnwindSafe for AllocationContext
impl !Send for AllocationContext
impl !Sync for AllocationContext
impl Unpin for AllocationContext
impl !UnwindSafe for AllocationContext
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