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

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

Built-in Passerine datatypes.

Variants

Heaped(Rc<RefCell<Data>>)

Data on the heap.

Real(f64)

Real Numbers, represented as double-precision floating points.

Boolean(bool)

A boolean, like true or false.

String(String)

A UTF-8 encoded string.

Lambda(Box<Lambda>)

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

Closure(Box<Closure>)

Some bytecode with a context that can be run.

Kind(String)

Kind is the base component of an unconstructed label

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

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

Unit

The empty Tuple

Tuple(Vec<Data>)

A non-empty Tuple.

Trait Implementations

impl Clone for Data[src]

impl Debug for Data[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

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

impl Display for Data[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

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

impl Eq for Data[src]

impl PartialEq<Data> for Data[src]

impl StructuralPartialEq for Data[src]

Auto Trait Implementations

impl !RefUnwindSafe for Data[src]

impl !Send for Data[src]

impl !Sync for Data[src]

impl Unpin for Data[src]

impl !UnwindSafe for Data[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.