Enum oftlisp::Value [] [src]

pub enum Value<C: 'static + Context> {
    AtomicWord(AtomicIsize, C::ValueMeta),
    BuiltinFunction(Symbol, C::BuiltinFunction, C::ValueMeta),
    Byte(u8, C::ValueMeta),
    Bytes(Gc<Vec<u8>>, C::ValueMeta),
    Cons(Gc<Value<C>>, Gc<Value<C>>, C::ValueMeta),
    Fixnum(isize, C::ValueMeta),
    Func(Option<Symbol>, Gc<Args<C>>, C::UserFunction, C::ValueMeta),
    Object(C::ObjectVtableVec<Gc<Value<C>>>, C::ValueMeta),
    Nil(C::ValueMeta),
    String(Gc<String>, C::ValueMeta),
    Symbol(Symbol, C::ValueMeta),
    Vector(Vec<Gc<Value<C>>>, C::ValueMeta),
}

A single OftLisp value.

Variants

A mutable, signed, machine-sized integer.

A built-in function.

An unsigned 8-bit integer.

A vector of arbitrary bytes, not subject to the UTF-8 condition of Strings.

A cons cell, used to create lists, trees, and other data structures.

A signed machine-sized integer.

A user-defined function.

The object type, containing a vtable and values.

The nil literal, used to terminate lists and signal failure (or the lack of interesting results).

A UTF-8 string.

An interned symbol, which may be compared in O(1).

A fixed-length collection with O(1) lookup.

Methods

impl<C: 'static + Context> Value<C>
[src]

[src]

A pseudo-constructor that converts a bool to a Value.

[src]

Converts an Iterator and a last element to an improper cons-list.

[src]

Converts an Iterator to a cons-list.

[src]

Extracts the metadata from a Value.

[src]

Converts an ordering to a Value.

[src]

Converts a Value between Contexts.

Will fail to transmute functions and objects.

[src]

Converts a Value between Contexts.

Will fail to transmute functions and objects. Any metadata will be discarded, with the default for the destination being used. To preserve metadata, use transmute_with instead.

[src]

Converts an Iterator to a vector.

Trait Implementations

impl<C: 'static + Context> Finalize for Value<C>
[src]

[src]

impl<C: 'static + Context> Trace for Value<C>
[src]

[src]

Marks all contained Gcs.

[src]

Increments the root-count of all contained Gcs.

[src]

Decrements the root-count of all contained Gcs.

[src]

Runs Finalize::finalize() on this object and all contained subobjects Read more

impl<C: 'static + Context> Drop for Value<C>
[src]

[src]

Executes the destructor for this type. Read more

impl<C: 'static + Context> Clone for Value<C>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: 'static + Context> Debug for Value<C>
[src]

[src]

Formats the value using the given formatter.

impl<C: 'static + Context> Display for Value<C>
[src]

[src]

Formats the value using the given formatter. Read more

impl<C: 'static + Context> PartialEq for Value<C>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<C: 'static + Context> PartialOrd for Value<C>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more