pub enum ExtensionValue {
Null,
Bool(bool),
UnsignedInteger(u64),
SignedInteger(i64),
Float(f64),
String(String),
Array(Vec<ExtensionValue>),
Object(BTreeMap<String, ExtensionValue>),
}Expand description
Any JSON value, modelled without a JSON dependency.
Used for the members of the wire the reference types leave open:
ContextRecord::extensions and
ContextRecord::extra.
Variants§
Null
JSON null.
Bool(bool)
JSON true / false.
UnsignedInteger(u64)
A non-negative integer that fits in a u64.
SignedInteger(i64)
A negative integer that fits in an i64.
Float(f64)
A number that is not an integer, or one outside the integer range.
String(String)
A JSON string.
Array(Vec<ExtensionValue>)
A JSON array.
Object(BTreeMap<String, ExtensionValue>)
A JSON object. Sorted by member name; the record hash sorts anyway.
Implementations§
Trait Implementations§
Source§impl Clone for ExtensionValue
impl Clone for ExtensionValue
Source§fn clone(&self) -> ExtensionValue
fn clone(&self) -> ExtensionValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtensionValue
impl Debug for ExtensionValue
Source§impl<'de> Deserialize<'de> for ExtensionValue
impl<'de> Deserialize<'de> for ExtensionValue
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for ExtensionValue
impl From<&str> for ExtensionValue
Source§impl From<String> for ExtensionValue
impl From<String> for ExtensionValue
Source§impl PartialEq for ExtensionValue
impl PartialEq for ExtensionValue
Source§impl Serialize for ExtensionValue
impl Serialize for ExtensionValue
impl StructuralPartialEq for ExtensionValue
Auto Trait Implementations§
impl Freeze for ExtensionValue
impl RefUnwindSafe for ExtensionValue
impl Send for ExtensionValue
impl Sync for ExtensionValue
impl Unpin for ExtensionValue
impl UnsafeUnpin for ExtensionValue
impl UnwindSafe for ExtensionValue
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