pub struct Box<'a, T, A: Allocator = &'a Arena> { /* private fields */ }Expand description
An arena-allocated box that retains a reference to its allocator, enabling Clone support.
This type is intended for recursive AST nodes (e.g. color-mix() containing nested <color> values) where
indirection is required to break the cycle, but the allocation should still live in the parsing arena.
Implementations§
Trait Implementations§
impl<'a, T: Eq, A: Allocator> Eq for Box<'a, T, A>
Source§impl<'a, T: Ord, A: Allocator> Ord for Box<'a, T, A>
impl<'a, T: Ord, A: Allocator> Ord for Box<'a, T, A>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, T: PartialOrd, A: Allocator> PartialOrd for Box<'a, T, A>
impl<'a, T: PartialOrd, A: Allocator> PartialOrd for Box<'a, T, A>
Auto Trait Implementations§
impl<'a, T, A = &'a Arena> !Send for Box<'a, T, A>
impl<'a, T, A = &'a Arena> !Sync for Box<'a, T, A>
impl<'a, T, A = &'a Arena> !UnwindSafe for Box<'a, T, A>
impl<'a, T, A> Freeze for Box<'a, T, A>where
A: Freeze,
impl<'a, T, A> RefUnwindSafe for Box<'a, T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, A> Unpin for Box<'a, T, A>where
A: Unpin,
impl<'a, T, A> UnsafeUnpin for Box<'a, T, A>where
A: UnsafeUnpin,
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