pub enum Value {
Nil,
Bool(bool),
Number(Fraction),
String(String),
Symbol(String),
Bytes(Vec<u8>),
Pair(Box<Pair>),
Vector(Vec<Value>),
Closure(Closure),
Struct {
name: String,
fields: Vec<Value>,
},
Commodity {
amount: Fraction,
commodity_id: Uuid,
},
}Variants§
Nil
Bool(bool)
Number(Fraction)
String(String)
Symbol(String)
Bytes(Vec<u8>)
Pair(Box<Pair>)
Vector(Vec<Value>)
Closure(Closure)
Struct
Commodity
Commodity-bearing amount: rational value tagged with the
originating commodity entity id. Distinct from Number so the
type system refuses cross-strata arithmetic (Commodity + Ratio,
Commodity + Commodity with different commodity_ids) at compile
or runtime. Conversion between commodities goes through the
Prices table via (convert-commodity ...).
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