pub enum Value {
Null,
Bool(bool),
Int(u64),
String(String),
List(Vec<Value>),
Set(Vec<Value>),
Map(BTreeMap<String, Value>),
Address {
space: String,
offset: u64,
},
AddressRange {
space: String,
start: u64,
end: u64,
},
Call {
name: String,
kwargs: BTreeMap<String, Value>,
},
Struct {
name: String,
fields: BTreeMap<String, Value>,
},
Enum {
type_name: String,
variant: String,
args: EnumArgs,
},
}Expand description
The DSL abstract syntax tree. Every serializable value is lowered into this
shape, then rendered to text (or parsed back from it). It is the single
pivot between Rust types and the textual DSL — both the generic
Serializer and Deserializer
speak only Value.
Variants§
Null
Bool(bool)
Int(u64)
String(String)
List(Vec<Value>)
Set(Vec<Value>)
Map(BTreeMap<String, Value>)
Address
AddressRange
Call
A top-level command: name(field=value, ...).
Struct
A named struct: Name(field=value, ...).
Enum
An enum variant: Type::Variant, Type::Variant(a, b), or
Type::Variant(field=value).
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