Enum passerine::common::data::Data[][src]

pub enum Data {
    Heaped(Rc<RefCell<Data>>),
    NotInit,
    Real(f64),
    Integer(i64),
    Boolean(bool),
    String(String),
    Lambda(Rc<Lambda>),
    Closure(Box<Closure>),
    Kind(String),
    Label(Box<String>, Box<Data>),
    Unit,
    Tuple(Vec<Data>),
}
Expand description

Built-in Passerine datatypes.

Variants

Heaped(Rc<RefCell<Data>>)

Data on the heap.

Tuple Fields of Heaped

0: Rc<RefCell<Data>>
NotInit

Uninitialized data.

Real(f64)

Real Numbers, represented as double-precision floating points.

Tuple Fields of Real

0: f64
Integer(i64)

Integers, currently 64-bit.

Tuple Fields of Integer

0: i64
Boolean(bool)

A boolean, like true or false.

Tuple Fields of Boolean

0: bool
String(String)

A UTF-8 encoded string.

Tuple Fields of String

0: String
Lambda(Rc<Lambda>)

Represents a function, ie.e some bytecode without a context.

Tuple Fields of Lambda

0: Rc<Lambda>
Closure(Box<Closure>)

Some bytecode with a context that can be run.

Tuple Fields of Closure

0: Box<Closure>
Kind(String)

Kind is the base component of an unconstructed label

Tuple Fields of Kind

0: String
Label(Box<String>, Box<Data>)

A Label is similar to a type, and wraps some data. in the future labels will have associated namespaces.

Tuple Fields of Label

0: Box<String>1: Box<Data>
Unit

The empty Tuple

Tuple(Vec<Data>)

A non-empty Tuple.

Tuple Fields of Tuple

0: Vec<Data>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Displays some Passerine Data following Rust conventions, with certain fields omitted.

Displays some Passerine Data in a pretty manner, as if it were printed to console.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.