pub enum RtVal {
Show 15 variants Unit, Pair(RtValRecRtValRec), Inj1(RtValRec), Inj2(RtValRec), Roll(RtValRec), NameFn(NameTm), Nat(usize), Str(String), Bool(bool), ThunkAnon(EnvRecExp), Name(Name), Ref(Ref), Thunk(Thk), Pack(RtValRec), HostObj(HostObj),
}
Expand description

Run-time values. Compare to ast::Val.

Same as Val, except that these values are (1) closed and (2) may contain run time-only structures, from the Adapton entine:

  • there are no variables (“closed”) and

  • unlike values written by user in their program, run-time values may contain run-time structures, such as actual thunks and references, a la Arts from Adapton library.

Variants

Unit

Unit value

Pair(RtValRecRtValRec)

Pair of run-time values

Inj1(RtValRec)

First injection of run-time value

Inj2(RtValRec)

Second injection of run-time value

Roll(RtValRec)

Rolled run-time value (with a recursive type)

NameFn(NameTm)

Dynamic name term

Nat(usize)

Natural number

Str(String)

String

Bool(bool)

Boolean

ThunkAnon(EnvRecExp)

Special-case thunk values: For implementing fix with environment-passing style

Name(Name)

AST Names; we convert to Adapton engine names when we use the engine API

Ref(Ref)

Refs from Adapton engine; they each contain a run-time value

Thunk(Thk)

Thunks from Adapton engine; they each evaluate to a terminal expression

Pack(RtValRec)

Existential packings; at run-time, we forget the choice of indices

HostObj(HostObj)

“Host objects”: native Rust objects

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.