pub enum PayloadValue {
String(String),
Integer(i64),
Float(f64),
Bool(bool),
List(Vec<PayloadValue>),
Object(HashMap<String, PayloadValue>),
Null,
}Expand description
Payload value types.
Variants§
String(String)
UTF-8 string value.
Integer(i64)
Signed 64-bit integer.
Float(f64)
64-bit floating-point number.
Bool(bool)
Boolean value.
List(Vec<PayloadValue>)
Ordered list of nested payload values.
Object(HashMap<String, PayloadValue>)
Nested key-value object.
Null
Explicit null / absent value.
Trait Implementations§
Source§impl Clone for PayloadValue
impl Clone for PayloadValue
Source§fn clone(&self) -> PayloadValue
fn clone(&self) -> PayloadValue
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 PayloadValue
impl Debug for PayloadValue
Source§impl<'de> Deserialize<'de> for PayloadValue
impl<'de> Deserialize<'de> for PayloadValue
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 From<&str> for PayloadValue
impl From<&str> for PayloadValue
Source§impl From<String> for PayloadValue
impl From<String> for PayloadValue
Source§impl From<bool> for PayloadValue
impl From<bool> for PayloadValue
Source§impl From<f64> for PayloadValue
impl From<f64> for PayloadValue
Source§impl From<i64> for PayloadValue
impl From<i64> for PayloadValue
Source§impl PartialEq for PayloadValue
impl PartialEq for PayloadValue
Source§fn eq(&self, other: &PayloadValue) -> bool
fn eq(&self, other: &PayloadValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PayloadValue
impl Serialize for PayloadValue
impl StructuralPartialEq for PayloadValue
Auto Trait Implementations§
impl Freeze for PayloadValue
impl RefUnwindSafe for PayloadValue
impl Send for PayloadValue
impl Sync for PayloadValue
impl Unpin for PayloadValue
impl UnsafeUnpin for PayloadValue
impl UnwindSafe for PayloadValue
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