Enum holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::dependencies::hc_seed_bundle::dependencies::rmpv::ValueRef
pub enum ValueRef<'a> {
Nil,
Boolean(bool),
Integer(Integer),
F32(f32),
F64(f64),
String(Utf8StringRef<'a>),
Binary(&'a [u8]),
Array(Vec<ValueRef<'a>, Global>),
Map(Vec<(ValueRef<'a>, ValueRef<'a>), Global>),
Ext(i8, &'a [u8]),
}
Variants
Nil
Nil represents nil.
Boolean(bool)
Boolean represents true or false.
Integer(Integer)
Integer represents an integer.
A value of an Integer
object is limited from -(2^63)
upto (2^64)-1
.
F32(f32)
A 32-bit floating point number.
F64(f64)
A 64-bit floating point number.
String(Utf8StringRef<'a>)
String extending Raw type represents a UTF-8 string.
Binary(&'a [u8])
Binary extending Raw type represents a byte array.
Array(Vec<ValueRef<'a>, Global>)
Array represents a sequence of objects.
Map(Vec<(ValueRef<'a>, ValueRef<'a>), Global>)
Map represents key-value pairs of objects.
Ext(i8, &'a [u8])
Extended implements Extension interface: represents a tuple of type information and a byte array where type information is an integer whose meaning is defined by applications.
Implementations
impl<'a> ValueRef<'a>
impl<'a> ValueRef<'a>
pub fn to_owned(&self) -> Value
pub fn to_owned(&self) -> Value
Converts the current non-owning value to an owned Value.
This is achieved by deep copying all underlying structures and borrowed buffers.
Panics
Panics in unable to allocate memory to keep all internal structures and buffers.
Examples
use rmpv::{Value, ValueRef};
let val = ValueRef::Array(vec![
ValueRef::Nil,
ValueRef::from(42),
ValueRef::Array(vec![
ValueRef::from("le message"),
])
]);
let expected = Value::Array(vec![
Value::Nil,
Value::from(42),
Value::Array(vec![
Value::String("le message".into())
])
]);
assert_eq!(expected, val.to_owned());
pub fn index(&self, index: usize) -> &ValueRef<'_>
pub fn as_u64(&self) -> Option<u64>
pub fn as_u64(&self) -> Option<u64>
If the ValueRef
is an integer, return or cast it to a u64.
Returns None otherwise.
Examples
use rmpv::ValueRef;
assert_eq!(Some(42), ValueRef::from(42).as_u64());
pub fn as_array(&self) -> Option<&Vec<ValueRef<'_>, Global>>
pub fn as_array(&self) -> Option<&Vec<ValueRef<'_>, Global>>
If the ValueRef
is an Array, returns the associated vector.
Returns None otherwise.
Examples
use rmpv::ValueRef;
let val = ValueRef::Array(vec![ValueRef::Nil, ValueRef::Boolean(true)]);
assert_eq!(Some(&vec![ValueRef::Nil, ValueRef::Boolean(true)]), val.as_array());
assert_eq!(None, ValueRef::Nil.as_array());
pub fn into_array(self) -> Option<Vec<ValueRef<'a>, Global>>
Trait Implementations
impl<'de> Deserialize<'de> for ValueRef<'de>
impl<'de> Deserialize<'de> for ValueRef<'de>
fn deserialize<D>(
de: D
) -> Result<ValueRef<'de>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
de: D
) -> Result<ValueRef<'de>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl<'de> Deserializer<'de> for &'de ValueRef<'de>
impl<'de> Deserializer<'de> for &'de ValueRef<'de>
type Error = Error
type Error = Error
fn deserialize_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read morefn deserialize_option<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_option<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an optional value. Read morefn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an enum value with a
particular name and possible variants. Read morefn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a newtype struct with a
particular name. Read morefn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit struct with a
particular name. Read morefn deserialize_bool<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a bool
value.fn deserialize_u8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u8
value.fn deserialize_u16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u16
value.fn deserialize_u32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u32
value.fn deserialize_u64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u64
value.fn deserialize_i8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i8
value.fn deserialize_i16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i16
value.fn deserialize_i32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i32
value.fn deserialize_i64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i64
value.fn deserialize_f32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f32
value.fn deserialize_f64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f64
value.fn deserialize_char<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a char
value.fn deserialize_str<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_string<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_unit<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit value.fn deserialize_seq<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values.fn deserialize_bytes<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_byte_buf<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_map<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a map of key-value pairs.fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a tuple struct with a
particular name and number of fields. Read morefn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a struct with a particular
name and fields. Read morefn deserialize_identifier<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant. Read morefn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data. Read morefn deserialize_ignored_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <&'de ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moresourcefn deserialize_i128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
sourcefn deserialize_u128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize
implementations should expect to
deserialize their human-readable form. Read moreimpl<'de> Deserializer<'de> for ValueRef<'de>
impl<'de> Deserializer<'de> for ValueRef<'de>
type Error = Error
type Error = Error
fn deserialize_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read morefn deserialize_option<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_option<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an optional value. Read morefn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an enum value with a
particular name and possible variants. Read morefn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a newtype struct with a
particular name. Read morefn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit struct with a
particular name. Read morefn deserialize_bool<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a bool
value.fn deserialize_u8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u8
value.fn deserialize_u16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u16
value.fn deserialize_u32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u32
value.fn deserialize_u64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u64
value.fn deserialize_i8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i8
value.fn deserialize_i16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i16
value.fn deserialize_i32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i32
value.fn deserialize_i64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i64
value.fn deserialize_f32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f32
value.fn deserialize_f64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f64
value.fn deserialize_char<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a char
value.fn deserialize_str<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_string<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_unit<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit value.fn deserialize_seq<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values.fn deserialize_bytes<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_byte_buf<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read morefn deserialize_map<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a map of key-value pairs.fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a tuple struct with a
particular name and number of fields. Read morefn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a struct with a particular
name and fields. Read morefn deserialize_identifier<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant. Read morefn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data. Read morefn deserialize_ignored_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, <ValueRef<'de> as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moresourcefn deserialize_i128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
sourcefn deserialize_u128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error>where
V: Visitor<'de>,
sourcefn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize
implementations should expect to
deserialize their human-readable form. Read moreimpl<'a, V> FromIterator<V> for ValueRef<'a>where
V: Into<ValueRef<'a>>,
impl<'a, V> FromIterator<V> for ValueRef<'a>where
V: Into<ValueRef<'a>>,
fn from_iter<I>(iter: I) -> ValueRef<'a>where
I: IntoIterator<Item = V>,
fn from_iter<I>(iter: I) -> ValueRef<'a>where
I: IntoIterator<Item = V>,
impl<'a> TryFrom<ValueRef<'a>> for Utf8StringRef<'a>
impl<'a> TryFrom<ValueRef<'a>> for Utf8StringRef<'a>
fn try_from(
val: ValueRef<'a>
) -> Result<Utf8StringRef<'a>, <Utf8StringRef<'a> as TryFrom<ValueRef<'a>>>::Error>
fn try_from(
val: ValueRef<'a>
) -> Result<Utf8StringRef<'a>, <Utf8StringRef<'a> as TryFrom<ValueRef<'a>>>::Error>
impl<'a> StructuralPartialEq for ValueRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Sync for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.