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.
source§impl JsonSchema for Value
impl JsonSchema for Value
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq for Value
impl PartialEq for Value
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