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
String
Integer
Decimal
Boolean
Object
Fields
§
values: Map<PropertyValue>Record
OrType
List
Optional
Map
UI
Implementations§
Source§impl 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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more