Struct arret_runtime::boxed::Pair[][src]

#[repr(C, align(16))]
pub struct Pair<T: Boxed = Any> { /* fields omitted */ }

Non-empty list

Implementations

impl<T: Boxed> Pair<T>[src]

pub fn new(
    heap: &mut impl AsHeap,
    head: Gc<T>,
    rest: Gc<List<T>>
) -> Gc<Pair<T>>
[src]

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> Boxed for Pair<T>[src]

impl ConstTagged for Pair[src]

impl<T: Boxed> Debug for Pair<T>[src]

impl DistinctTagged for Pair[src]

impl<T: Boxed> EncodeBoxedAbiType for Pair<T> where
    T: EncodeBoxedAbiType
[src]

impl<T: Boxed> HashInHeap for Pair<T>[src]

impl<T: Boxed> PartialEqInHeap for Pair<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Pair<T> where
    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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.