pub enum Value {
Null,
Opt(Box<Value>),
Bool(bool),
Int(i64),
Uint(u64),
Float(NotNan<f64>),
String(String),
Blob(Vec<u8>),
Array(Vec<Value>),
Map(BTreeMap<Value, Value>),
}
Expand description
In-memory, structured representation of a Neodyn Exchange value tree.
Variants
Null
No value (an optional value that is not present).
Opt(Box<Value>)
An optional value that is present.
Bool(bool)
A Boolean value.
Int(i64)
A signed 64-bit integer value.
Uint(u64)
An unsigned 64-bit integer value.
Float(NotNan<f64>)
A 64-bit canonicalized floating-point value that is not NaN
.
String(String)
A UTF-8 string value.
Blob(Vec<u8>)
Raw binary data.
Array(Vec<Value>)
An array of Neodyn Exchange values.
Map(BTreeMap<Value, Value>)
A collection of key-value pairs, mapping Value
s to other Value
s.
Implementations
sourceimpl Value
impl Value
sourcepub const fn value_type(&self) -> ValueType
pub const fn value_type(&self) -> ValueType
Returns the dynamic type tag of this value.
sourcepub const fn is_opt(&self) -> bool
pub const fn is_opt(&self) -> bool
Returns true if and only if this value is an Opt
containing a value.
sourcepub const fn is_null_or_opt(&self) -> bool
pub const fn is_null_or_opt(&self) -> bool
Returns true iff this value is either null or an Opt
.
sourcepub const fn is_uint(&self) -> bool
pub const fn is_uint(&self) -> bool
Returns true if and only if this value is an unsigned integer.
sourcepub const fn is_number(&self) -> bool
pub const fn is_number(&self) -> bool
Returns true if and only if this value is any type of number, i.e. signed integer, unsigned integer, or floating-point.
sourcepub fn as_opt(&self) -> Result<Option<&Value>, Error>
pub fn as_opt(&self) -> Result<Option<&Value>, Error>
Borrows the inner value of an optional.
Returns None
if self
is Null
, Some
if it’s Opt
.
sourcepub fn into_opt(self) -> Result<Option<Value>, Error>
pub fn into_opt(self) -> Result<Option<Value>, Error>
Returns the inner value of an optional, consuming the value.
Returns None
if self
is Null
, Some
if it’s Opt
.
sourcepub fn as_mut_string(&mut self) -> Result<&mut String, Error>
pub fn as_mut_string(&mut self) -> Result<&mut String, Error>
Mutably borrows the string value.
sourcepub fn into_string(self) -> Result<String, Error>
pub fn into_string(self) -> Result<String, Error>
Returns the string, consuming the value.
sourcepub fn as_mut_array(&mut self) -> Result<&mut Vec<Value>, Error>
pub fn as_mut_array(&mut self) -> Result<&mut Vec<Value>, Error>
Mutably borrows the array value.
Trait Implementations
sourceimpl<'a> Deserialize<'a> for Value
impl<'a> Deserialize<'a> for Value
sourcefn deserialize<D: Deserializer<'a>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'a>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'de> Deserializer<'de> for Value
impl<'de> Deserializer<'de> for Value
The actual Deserializer
impl.
type Error = Error
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether Deserialize
implementations should expect to
deserialize their human-readable form. Read more
sourcefn deserialize_any<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_any<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Require the Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read more
sourcefn deserialize_bool<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_bool<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a bool
value.
sourcefn deserialize_i8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i8
value.
sourcefn deserialize_i16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i16
value.
sourcefn deserialize_i32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i32
value.
sourcefn deserialize_i64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i64
value.
sourcefn deserialize_i128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i128
value. Read more
sourcefn deserialize_u8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u8
value.
sourcefn deserialize_u16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u16
value.
sourcefn deserialize_u32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u32
value.
sourcefn deserialize_u64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u64
value.
sourcefn deserialize_u128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an u128
value. Read more
sourcefn deserialize_f32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_f32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a f32
value.
sourcefn deserialize_f64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_f64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a f64
value.
sourcefn deserialize_char<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_char<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a char
value.
sourcefn deserialize_str<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_str<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_string<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_string<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_bytes<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_bytes<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_byte_buf<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_byte_buf<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_option<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_option<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an optional value. Read more
sourcefn deserialize_unit<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_unit<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a unit value.
sourcefn deserialize_unit_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_unit_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a unit struct with a
particular name. Read more
sourcefn deserialize_newtype_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_newtype_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a newtype struct with a
particular name. Read more
sourcefn deserialize_seq<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_seq<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a sequence of values.
sourcefn deserialize_tuple<V: Visitor<'de>>(
self,
_len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_tuple<V: Visitor<'de>>(
self,
_len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data. Read more
sourcefn deserialize_tuple_struct<V: Visitor<'de>>(
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_tuple_struct<V: Visitor<'de>>(
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a tuple struct with a
particular name and number of fields. Read more
sourcefn deserialize_map<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_map<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a map of key-value pairs.
sourcefn deserialize_struct<V: Visitor<'de>>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_struct<V: Visitor<'de>>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a struct with a particular
name and fields. Read more
sourcefn deserialize_enum<V: Visitor<'de>>(
self,
_type_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_enum<V: Visitor<'de>>(
self,
_type_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an enum value with a
particular name and possible variants. Read more
sourceimpl<'de> Deserializer<'de> for &'de Value
impl<'de> Deserializer<'de> for &'de Value
The actual Deserializer
impl.
type Error = Error
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Determine whether Deserialize
implementations should expect to
deserialize their human-readable form. Read more
sourcefn deserialize_any<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_any<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Require the Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read more
sourcefn deserialize_bool<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_bool<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a bool
value.
sourcefn deserialize_i8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i8
value.
sourcefn deserialize_i16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i16
value.
sourcefn deserialize_i32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i32
value.
sourcefn deserialize_i64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i64
value.
sourcefn deserialize_i128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_i128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an i128
value. Read more
sourcefn deserialize_u8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u8<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u8
value.
sourcefn deserialize_u16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u16<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u16
value.
sourcefn deserialize_u32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u32
value.
sourcefn deserialize_u64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a u64
value.
sourcefn deserialize_u128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_u128<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an u128
value. Read more
sourcefn deserialize_f32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_f32<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a f32
value.
sourcefn deserialize_f64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_f64<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a f64
value.
sourcefn deserialize_char<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_char<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a char
value.
sourcefn deserialize_str<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_str<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_string<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_string<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_bytes<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_bytes<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_byte_buf<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_byte_buf<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read more
sourcefn deserialize_option<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_option<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an optional value. Read more
sourcefn deserialize_unit<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_unit<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a unit value.
sourcefn deserialize_unit_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_unit_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a unit struct with a
particular name. Read more
sourcefn deserialize_newtype_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_newtype_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a newtype struct with a
particular name. Read more
sourcefn deserialize_seq<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_seq<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a sequence of values.
sourcefn deserialize_tuple<V: Visitor<'de>>(
self,
_len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_tuple<V: Visitor<'de>>(
self,
_len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data. Read more
sourcefn deserialize_tuple_struct<V: Visitor<'de>>(
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_tuple_struct<V: Visitor<'de>>(
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a tuple struct with a
particular name and number of fields. Read more
sourcefn deserialize_map<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_map<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a map of key-value pairs.
sourcefn deserialize_struct<V: Visitor<'de>>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_struct<V: Visitor<'de>>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a struct with a particular
name and fields. Read more
sourcefn deserialize_enum<V: Visitor<'de>>(
self,
_type_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn deserialize_enum<V: Visitor<'de>>(
self,
_type_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an enum value with a
particular name and possible variants. Read more
sourceimpl Display for Value
impl Display for Value
Formats the value using the human-readable text representation.
By default, the value will be pretty-printed. Specifying the alternate
flag ({:#}
) has the effect of outputting a compact format instead.
sourceimpl<'a> From<&'a Value> for Unexpected<'a>
impl<'a> From<&'a Value> for Unexpected<'a>
sourceimpl<K, V> From<BTreeMap<K, V, Global>> for Value where
K: Into<Value>,
V: Into<Value>,
impl<K, V> From<BTreeMap<K, V, Global>> for Value where
K: Into<Value>,
V: Into<Value>,
Creates a map
.
sourceimpl<K, V, S> From<HashMap<K, V, S>> for Value where
K: Into<Value>,
V: Into<Value>,
impl<K, V, S> From<HashMap<K, V, S>> for Value where
K: Into<Value>,
V: Into<Value>,
Creates a map
.
sourceimpl From<OrderedFloat<f32>> for Value
impl From<OrderedFloat<f32>> for Value
NaN
is not permitted in Neodyn Exchange values. It will be converted
to Value::Null
if it is ever encountered.
sourcefn from(value: OrderedFloat<f32>) -> Self
fn from(value: OrderedFloat<f32>) -> Self
Converts to this type from the input type.
sourceimpl From<OrderedFloat<f64>> for Value
impl From<OrderedFloat<f64>> for Value
NaN
is not permitted in Neodyn Exchange values. It will be converted
to Value::Null
if it is ever encountered.
sourcefn from(value: OrderedFloat<f64>) -> Self
fn from(value: OrderedFloat<f64>) -> Self
Converts to this type from the input type.
sourceimpl From<f32> for Value
impl From<f32> for Value
NaN
is not permitted in Neodyn Exchange values. It will be converted
to Value::Null
if it is ever encountered.
sourceimpl From<f64> for Value
impl From<f64> for Value
NaN
is not permitted in Neodyn Exchange values. It will be converted
to Value::Null
if it is ever encountered.
sourceimpl<K, V> FromIterator<(K, V)> for Value where
K: Into<Value>,
V: Into<Value>,
impl<K, V> FromIterator<(K, V)> for Value where
K: Into<Value>,
V: Into<Value>,
Creates a map from an iterator over key-value pairs.
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = (K, V)>,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = (K, V)>,
Creates a value from an iterator. Read more
sourceimpl<T> FromIterator<T> for Value where
T: Into<Value>,
impl<T> FromIterator<T> for Value where
T: Into<Value>,
Creates an array from an iterator over single values.
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
sourceimpl<'de> IntoDeserializer<'de, Error> for Value
impl<'de> IntoDeserializer<'de, Error> for Value
type Deserializer = Value
type Deserializer = Value
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for &'de Value
impl<'de> IntoDeserializer<'de, Error> for &'de Value
type Deserializer = &'de Value
type Deserializer = &'de Value
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl Ord for Value
impl Ord for Value
sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more