pub enum Value {
String {
text: String,
},
Integer {
value: i64,
},
Decimal {
value: f64,
},
Boolean {
value: bool,
},
Object {
values: Map<PropertyValue>,
},
Record {
name: String,
fields: Map<PropertyValue>,
},
KwArgs {
arguments: Map<PropertyValue>,
},
OrType {
name: String,
variant: String,
full_variant: String,
value: Box<PropertyValue>,
},
List {
data: Vec<PropertyValue>,
kind: KindData,
},
Optional {
data: Box<Option<Value>>,
kind: KindData,
},
UI {
name: String,
kind: KindData,
component: ComponentInvocation,
},
Module {
name: String,
things: Map<ModuleThing>,
},
}Variants§
String
Integer
Decimal
Boolean
Object
Fields
§
values: Map<PropertyValue>Record
KwArgs
Fields
§
arguments: Map<PropertyValue>OrType
List
Optional
UI
Module
Implementations§
Source§impl Value
impl Value
pub fn new_none(kind: KindData) -> Value
pub fn new_string(text: &str) -> Value
pub fn new_or_type( name: &str, variant: &str, full_variant: &str, value: PropertyValue, ) -> Value
pub fn inner(&self) -> Option<Self>
pub fn into_property_value( self, is_mutable: bool, line_number: usize, ) -> PropertyValue
pub fn kind(&self) -> Kind
pub fn is_record(&self, rec_name: &str) -> bool
pub fn is_or_type_variant(&self, or_variant: &str) -> bool
pub fn ref_inner(&self) -> Option<&Self>
pub fn module_name_optional(&self) -> Option<String>
pub fn mut_module_optional(&mut self) -> Option<(&str, &mut Map<ModuleThing>)>
pub fn is_null(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn is_equal(&self, other: &Self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 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