[][src]Enum adapton::reflect::Val

pub enum Val {
    Constr(NameVec<Val>),
    Tuple(Vec<Val>),
    Vec(Vec<Val>),
    Struct(NameVec<(Name, Val)>),
    Art(LocArtContent),
    Name(Name),
    Const(Const),
    ValTODO,
}

Reflected value; Gives a syntax for inductive data type constructors (Constr), named articulations (Art) and primitive data (Data). All values in the engine (including the values of nodes, and the values stored on edges) are represented with this reflected Val type. Primarily, this distinction between actual Rust values and this type is what makes the DCG engine "reflected" by the definitions in this module, and not identical to them.

Variants

Constr(NameVec<Val>)

Constructor, with a sequence of value parameters.

Tuple(Vec<Val>)

A tuple of values (like a constructor, but without a constructor name). Can be seen as a special case of Constr.

Vec(Vec<Val>)

A list of values (like a tuple, but parsed and printed differently). Can be seen as a special case of Constr.

Struct(NameVec<(Name, Val)>)

Constructor with a sequence of fields (name-value pairs) as parameters.

Named articulation, and its content (an Art is either a named value, or a named computation).

Name(Name)

First-class Name value.

Const(Const)

Primitive, immutable data.

ValTODO

Temporary; for marking places in code where we should produce a value, but don't yet have a good way to do so.

Trait Implementations

impl Clone for Val[src]

impl Debug for Val[src]

impl Eq for Val[src]

impl Hash for Val[src]

impl PartialEq<Val> for Val[src]

impl StructuralEq for Val[src]

impl StructuralPartialEq for Val[src]

Auto Trait Implementations

impl !RefUnwindSafe for Val

impl !Send for Val

impl !Sync for Val

impl Unpin for Val

impl !UnwindSafe for Val

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, 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.