Enum relay_protocol::Value
source · pub enum Value {
Bool(bool),
I64(i64),
U64(u64),
F64(f64),
String(String),
Array(Array<Value>),
Object(Object<Value>),
}
Expand description
Represents a boxed value.
Variants§
Bool(bool)
A boolean value.
I64(i64)
A signed integer value.
U64(u64)
An unsigned integer value.
F64(f64)
A floating point value.
String(String)
A string value.
Array(Array<Value>)
An array of annotated values.
Object(Object<Value>)
A mapping of strings to annotated values.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
source§fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoValue for Value
impl IntoValue for Value
source§fn into_value(self) -> Value
fn into_value(self) -> Value
Boxes the meta structure back into a value.
source§fn serialize_payload<S>(
&self,
s: S,
_behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
fn serialize_payload<S>(
&self,
s: S,
_behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
Efficiently serializes the payload directly.
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)