pub enum Value {
Int(i64),
Float(f64),
Str(String),
Bool(bool),
Array(Vec<Value>),
Range(i64, i64),
Struct {
name: String,
fields: Vec<(String, Value)>,
},
Enum {
enum_name: String,
variant: String,
fields: Vec<(String, Value)>,
},
Unit,
}Variants§
Int(i64)
Float(f64)
Str(String)
Bool(bool)
Array(Vec<Value>)
Range(i64, i64)
A half-open range, the thing a for i in 0..5 walks.
Struct
A struct value: a named record of labelled fields, in declared order.
Enum
An enum value: one named case of an enum, carrying its labelled values.
Unit
The result of something done only for its effect, like print.
Implementations§
Trait Implementations§
impl StructuralPartialEq 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