Struct oxischeme::value::Cons [-]  [+] [src]

pub struct Cons {
    // some fields omitted
}

A cons cell is a pair of car and cdr values. A list is one or more cons cells, daisy chained together via the cdr. A list is "proper" if the last cdr is Value::EmptyList, or the scheme value (). Otherwise, it is "improper".

Methods

impl Cons

fn car(&self, heap: &mut Heap) -> RootedValue

Get the car of this cons cell.

fn cdr(&self, heap: &mut Heap) -> RootedValue

Get the cdr of this cons cell.

fn set_car(&mut self, car: &RootedValue)

Set the car of this cons cell.

fn set_cdr(&mut self, cdr: &RootedValue)

Set the cdr of this cons cell.

impl Cons

The 28 car/cdr compositions.

fn cddr(&self, heap: &mut Heap) -> SchemeResult

fn cdddr(&self, heap: &mut Heap) -> SchemeResult

fn cadr(&self, heap: &mut Heap) -> SchemeResult

fn caddr(&self, heap: &mut Heap) -> SchemeResult

fn cadddr(&self, heap: &mut Heap) -> SchemeResult

Trait Implementations

impl Default for Cons

fn default() -> Cons

Do not use this method, instead allocate cons cells on the heap with Heap::allocate_cons and get back a ConsPtr.

impl Trace for Cons

fn trace(&self) -> IterGcThing

Derived Implementations

impl PartialEq for Cons

fn eq(&self, __arg_0: &Cons) -> bool

fn ne(&self, __arg_0: &Cons) -> bool

impl<__S: Writer + Hasher> Hash<__S> for Cons

fn hash(&self, __arg_0: &mut __S)

impl Eq for Cons

fn assert_receiver_is_total_eq(&self)

impl Copy for Cons