pub enum Value {
Show 17 variants
Int(i64),
Float(f64),
Str(String),
Bool(bool),
Unit,
Ok(Box<Value>),
Err(Box<Value>),
Some(Box<Value>),
None,
List(AverList<Value>),
Tuple(Vec<Value>),
Map(HashMap<Value, Value>),
Fn {
name: String,
params: Vec<(String, String)>,
return_type: String,
effects: Vec<String>,
body: Rc<FnBody>,
resolution: Option<FnResolution>,
memo_eligible: bool,
home_globals: Option<Rc<HashMap<String, Rc<Value>>>>,
},
Builtin(String),
Variant {
type_name: String,
variant: String,
fields: Vec<Value>,
},
Record {
type_name: String,
fields: Vec<(String, Value)>,
},
Namespace {
name: String,
members: HashMap<String, Value>,
},
}Variants§
Int(i64)
Float(f64)
Str(String)
Bool(bool)
Unit
Ok(Box<Value>)
Err(Box<Value>)
Some(Box<Value>)
None
List(AverList<Value>)
Tuple(Vec<Value>)
Map(HashMap<Value, Value>)
Fn
Fields
§
resolution: Option<FnResolution>Compile-time resolution metadata (slot layout for locals).
Builtin(String)
Variant
User-defined sum type variant, e.g. Shape.Circle(3.14)
Record
User-defined product type (record), e.g. User(name = "Alice", age = 30)
Namespace
Type namespace: Shape — provides Shape.Circle, Shape.Rect, etc.
Trait Implementations§
impl Eq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.