Enum adapton::reflect::Val
[−]
[src]
pub enum Val { Constr(Name, Vec<Val>), Tuple(Vec<Val>), Vec(Vec<Val>), Struct(Name, Vec<(Name, Val)>), Art(Loc, ArtContent), 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(Name, Vec<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(Name, Vec<(Name, Val)>)
Constructor with a sequence of fields (name-value pairs) as parameters.
Art(Loc, ArtContent)
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 Debug for Val
[src]
impl Clone for Val
[src]
fn clone(&self) -> Val
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for Val
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more