pub enum CanonicalValue {
Null,
Absent,
Bool {
value: bool,
},
Integer {
value: String,
},
Decimal {
value: String,
},
Float {
value: String,
},
String {
value: String,
},
Bytes {
base64: String,
media_type: Option<String>,
},
Array {
items: Vec<CanonicalValue>,
},
Object {
fields: BTreeMap<String, CanonicalValue>,
},
DateTime {
rfc3339: String,
},
Json {
value: Value,
},
}Variants§
Null
Absent
Bool
Integer
Decimal
Float
String
Bytes
Array
Fields
§
items: Vec<CanonicalValue>Object
Fields
§
fields: BTreeMap<String, CanonicalValue>DateTime
Json
Implementations§
Trait Implementations§
Source§impl Clone for CanonicalValue
impl Clone for CanonicalValue
Source§impl Debug for CanonicalValue
impl Debug for CanonicalValue
Source§impl<'de> Deserialize<'de> for CanonicalValue
impl<'de> Deserialize<'de> for CanonicalValue
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
Source§impl JsonSchema for CanonicalValue
impl JsonSchema for CanonicalValue
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CanonicalValue
impl PartialEq for CanonicalValue
Source§impl Serialize for CanonicalValue
impl Serialize for CanonicalValue
impl StructuralPartialEq for CanonicalValue
Auto Trait Implementations§
impl Forget for CanonicalValue
impl Freeze for CanonicalValue
impl Move for CanonicalValue
impl RefUnwindSafe for CanonicalValue
impl Send for CanonicalValue
impl Sync for CanonicalValue
impl Unpin for CanonicalValue
impl UnsafeUnpin for CanonicalValue
impl UnwindSafe for CanonicalValue
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