pub enum Value {
Show 14 variants
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,
},
AddressSet {
space: String,
ranges: Vec<(u64, u64)>,
},
Call {
name: String,
kwargs: Fields,
},
Struct {
name: String,
fields: Fields,
},
Enum {
type_name: String,
variant: String,
args: EnumArgs,
},
Verbatim(String),
}Expand description
The DSL abstract syntax tree: the one pivot between Rust types and DSL text.
Variants§
Null
Bool(bool)
Int(u64)
String(String)
List(Vec<Value>)
Set(Vec<Value>)
Map(BTreeMap<String, Value>)
Address
AddressRange
AddressSet
A set of addresses within one space: CODE:{0x10..0x13, 0x20}. Ranges
are half-open (start, end); a singleton has end == start + 1.
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).
Verbatim(String)
Pre-rendered DSL text, spliced as-is. Never produced by parsing.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Forget for Value
impl Freeze for Value
impl Move 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