pub enum Value {
Show 24 variants
Int(BigInt),
Float(f64),
Str(String),
Bool(bool),
Null,
Absent,
Undef,
Q {
dim: String,
value: f64,
},
Ref(Rc<SegPath>),
Rec(Rc<RefCell<RecInst>>),
Arr(Rc<RefCell<ArrV>>),
Map(Rc<RefCell<MapV>>),
Range {
lo: Box<Value>,
hi: Box<Value>,
excl: bool,
},
Clo(Rc<Closure>),
Nat(NatFn),
Std(Rc<Vec<String>>),
NsRef(Rc<NsRefV>),
Pat(String),
PreObj(Rc<Vec<(String, Value)>>),
PreArr(Rc<Vec<(bool, Value)>>),
PreVal(Rc<PreValV>),
JObj(Rc<Vec<(String, Value)>>),
JArr(Rc<Vec<Value>>),
Segs(Rc<SegPath>),
}Expand description
a runtime value (§9): the scalars, quantities, references, and instances, and the engine’s intermediate forms
Variants§
Int(BigInt)
an integer
Float(f64)
a float
Str(String)
a string
Bool(bool)
a boolean
Null
null
Absent
an absent optional member (§4.6)
Undef
not yet computed
Q
a quantity
Ref(Rc<SegPath>)
a reference, by canonical path
Rec(Rc<RefCell<RecInst>>)
a record instance
Arr(Rc<RefCell<ArrV>>)
an array
Map(Rc<RefCell<MapV>>)
a map
Range
a range value
Fields
Clo(Rc<Closure>)
a closure
Nat(NatFn)
a native function
Std(Rc<Vec<String>>)
a standard-library path, partially spelled
NsRef(Rc<NsRefV>)
a namespace
Pat(String)
a pattern
PreObj(Rc<Vec<(String, Value)>>)
a record literal not yet bound
PreArr(Rc<Vec<(bool, Value)>>)
an array literal not yet bound: (spread, item)
PreVal(Rc<PreValV>)
an expression not yet evaluated, with its scope
JObj(Rc<Vec<(String, Value)>>)
a JSON object, as read
JArr(Rc<Vec<Value>>)
a JSON array, as read
Segs(Rc<SegPath>)
a path value
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl !UnwindSafe for Value
impl Freeze for Value
impl Unpin for Value
impl UnsafeUnpin 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