pub enum Value {
None {
kind: Kind,
},
String {
text: String,
source: TextSource,
},
Integer {
value: i64,
},
Decimal {
value: f64,
},
Boolean {
value: bool,
},
Object {
values: Map<PropertyValue>,
},
Record {
name: String,
fields: Map<PropertyValue>,
},
OrType {
name: String,
variant: String,
fields: Map<PropertyValue>,
},
List {
data: Vec<PropertyValue>,
kind: Kind,
},
Optional {
data: Box<Option<Value>>,
kind: Kind,
},
Map {
data: Map<Value>,
kind: Kind,
},
UI {
name: String,
kind: Kind,
data: Map<Property>,
},
}
Variants
None
Fields
kind: Kind
String
Integer
Fields
value: i64
Decimal
Fields
value: f64
Boolean
Fields
value: bool
Object
Fields
values: Map<PropertyValue>
Record
OrType
List
Optional
Map
UI
Implementations
sourceimpl Value
impl Value
sourcepub fn default_optional_value_from_kind(kind: Kind) -> Self
pub fn default_optional_value_from_kind(kind: Kind) -> Self
returns a default optional value from given kind
pub fn inner_with_none(self) -> Self
pub fn inner(self) -> Option<Self>
pub fn into_optional(self) -> Value
pub fn is_null(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn kind(&self) -> Kind
pub fn is_equal(&self, other: &Self) -> bool
pub fn to_serde_value(&self) -> Option<Value>
pub fn to_string(&self) -> Option<String>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
sourcefn 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
sourceimpl PartialEq<Value> for Value
impl PartialEq<Value> for Value
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more