Struct arret_runtime::boxed::Pair [−][src]
Non-empty list
Implementations
impl<T: Boxed> Pair<T>
[src]
impl<T: Boxed> Pair<T>
[src]pub fn new(
heap: &mut impl AsHeap,
head: Gc<T>,
rest: Gc<List<T>>
) -> Gc<Pair<T>>
[src]
heap: &mut impl AsHeap,
head: Gc<T>,
rest: Gc<List<T>>
) -> Gc<Pair<T>>
Constructs a pair with the given head
and rest
pub fn size() -> BoxSize
[src]
Returns the box size for pairs
pub fn len(&self) -> usize
[src]
Returns the length of the list this pair is the head of
Note that this must be at least 1.
pub fn is_empty(&self) -> bool
[src]
Returns false
pub fn head(&self) -> Gc<T>
[src]
Returns the head value
pub fn rest(&self) -> Gc<List<T>>
[src]
Returns the tail list
pub fn as_list_ref(&self) -> Gc<List<T>>
[src]
Casts this pair to a non-empty list
Trait Implementations
impl<T: Boxed> EncodeBoxedAbiType for Pair<T> where
T: EncodeBoxedAbiType,
[src]
impl<T: Boxed> EncodeBoxedAbiType for Pair<T> where
T: EncodeBoxedAbiType,
[src]const BOXED_ABI_TYPE: BoxedAbiType
[src]
impl<T: Boxed> HashInHeap for Pair<T>
[src]
impl<T: Boxed> HashInHeap for Pair<T>
[src]fn hash_in_heap<H: Hasher>(&self, task: &Heap, state: &mut H)
[src]
impl<T: Boxed> PartialEqInHeap for Pair<T>
[src]
impl<T: Boxed> PartialEqInHeap for Pair<T>
[src]fn eq_in_heap(&self, heap: &Heap, rhs: &Pair<T>) -> bool
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Pair<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T = Any> !Send for Pair<T>
impl<T = Any> !Sync for Pair<T>
impl<T> Unpin for Pair<T>
impl<T> UnwindSafe for Pair<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,