Enum simd_json::value::borrowed::Value [−][src]
pub enum Value<'value> {
Static(StaticNode),
String(Cow<'value, str>),
Array(Vec<Value<'value>>),
Object(Box<Object<'value>>),
}Expand description
Borrowed JSON-DOM Value, consider using the ValueTrait
to access its content
Variants
Static(StaticNode)Static values
string type
array type
object type
Implementations
impl<'value> Value<'value>[src]
impl<'value> Value<'value>[src]#[must_use]pub fn into_static(self) -> Value<'static>[src]
#[must_use]pub fn into_static(self) -> Value<'static>[src]Enforces static lifetime on a borrowed value, this will force all strings to become owned COW’s, the same applies for Object keys.
#[must_use]pub fn clone_static(&self) -> Value<'static>[src]
#[must_use]pub fn clone_static(&self) -> Value<'static>[src]Clones the current value and enforces a static lifetime, it works the same
as into_static but includes cloning logic
Trait Implementations
impl<'value> Builder<'value> for Value<'value>[src]
impl<'value> Builder<'value> for Value<'value>[src]#[must_use]fn array_with_capacity(capacity: usize) -> Self[src]
#[must_use]fn array_with_capacity(capacity: usize) -> Self[src]Returns an empty array with a given capacity
#[must_use]fn object_with_capacity(capacity: usize) -> Self[src]
#[must_use]fn object_with_capacity(capacity: usize) -> Self[src]Returns an empty object with a given capacity
impl<'de> Deserialize<'de> for Value<'de>[src]
impl<'de> Deserialize<'de> for Value<'de>[src]fn deserialize<D>(deserializer: D) -> Result<Value<'de>, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Value<'de>, D::Error> where
D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl<'de> Deserializer<'de> for Value<'de>[src]
impl<'de> Deserializer<'de> for Value<'de>[src]type Error = Error
type Error = ErrorThe error type that can be returned if some error occurs during deserialization. Read more
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Require the Deserializer to figure out how to drive the visitor based
on what data type is in the input. Read more
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an optional value. Read more
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a struct with a particular
name and fields. Read more
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a bool value.
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i8 value.
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i16 value.
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i32 value.
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i64 value.
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i128 value. Read more
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u8 value.
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u16 value.
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u32 value.
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u64 value.
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an u128 value. Read more
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a f32 value.
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a f64 value.
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a char value.
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a unit value.
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a unit struct with a
particular name. Read more
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a newtype struct with a
particular name. Read more
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a sequence of values.
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a tuple struct with a
particular name and number of fields. Read more
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a map of key-value pairs.
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an enum value with a
particular name and possible variants. Read more
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting the name of a struct
field or the discriminant of an enum variant. Read more
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read more
fn is_human_readable(&self) -> bool[src]
fn is_human_readable(&self) -> bool[src]Determine whether Deserialize implementations should expect to
deserialize their human-readable form. Read more
impl<'de> Deserializer<'de> for &'de Value<'de>[src]
impl<'de> Deserializer<'de> for &'de Value<'de>[src]type Error = Error
type Error = ErrorThe error type that can be returned if some error occurs during deserialization. Read more
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Require the Deserializer to figure out how to drive the visitor based
on what data type is in the input. Read more
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an optional value. Read more
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a struct with a particular
name and fields. Read more
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a bool value.
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i8 value.
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i16 value.
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i32 value.
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i64 value.
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an i128 value. Read more
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u8 value.
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u16 value.
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u32 value.
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a u64 value.
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an u128 value. Read more
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a f32 value.
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a f64 value.
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a char value.
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a unit value.
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a unit struct with a
particular name. Read more
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a newtype struct with a
particular name. Read more
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a sequence of values.
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]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
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a tuple struct with a
particular name and number of fields. Read more
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting a map of key-value pairs.
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_enum<V>(
self,
name: &'static str,
variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting an enum value with a
particular name and possible variants. Read more
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type is expecting the name of a struct
field or the discriminant of an enum variant. Read more
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>, [src]Hint that the Deserialize type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read more
fn is_human_readable(&self) -> bool[src]
fn is_human_readable(&self) -> bool[src]Determine whether Deserialize implementations should expect to
deserialize their human-readable form. Read more
impl<'value> From<StaticNode> for Value<'value>[src]
impl<'value> From<StaticNode> for Value<'value>[src]#[must_use]fn from(s: StaticNode) -> Self[src]
#[must_use]fn from(s: StaticNode) -> Self[src]Performs the conversion.
impl From<Value<'_>> for Value[src]
impl From<Value<'_>> for Value[src]#[must_use]fn from(b: BorrowedValue<'_>) -> Self[src]
#[must_use]fn from(b: BorrowedValue<'_>) -> Self[src]Performs the conversion.
impl<'value> From<Value> for Value<'value>[src]
impl<'value> From<Value> for Value<'value>[src]#[must_use]fn from(b: OwnedValue) -> Self[src]
#[must_use]fn from(b: OwnedValue) -> Self[src]Performs the conversion.
impl<'value, K: Into<Cow<'value, str>>, V: Into<Value<'value>>> FromIterator<(K, V)> for Value<'value>[src]
impl<'value, K: Into<Cow<'value, str>>, V: Into<Value<'value>>> FromIterator<(K, V)> for Value<'value>[src]impl<'value, V: Into<Value<'value>>> FromIterator<V> for Value<'value>[src]
impl<'value, V: Into<Value<'value>>> FromIterator<V> for Value<'value>[src]#[must_use]fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self[src]
#[must_use]fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self[src]Creates a value from an iterator. Read more
impl<'value> Mutable for Value<'value>[src]
impl<'value> Mutable for Value<'value>[src]#[must_use]fn as_array_mut(&mut self) -> Option<&mut Vec<Value<'value>>>[src]
#[must_use]fn as_array_mut(&mut self) -> Option<&mut Vec<Value<'value>>>[src]Tries to represent the value as an array and returns a mutable refference to it
#[must_use]fn as_object_mut(&mut self) -> Option<&mut HashMap<Self::Key, Self>>[src]
#[must_use]fn as_object_mut(&mut self) -> Option<&mut HashMap<Self::Key, Self>>[src]Tries to represent the value as an object and returns a mutable refference to it
fn insert<K, V>(
&mut self,
k: K,
v: V
) -> Result<Option<Self::Target>, AccessError> where
V: Into<Self::Target>,
K: Into<Self::Key>,
Self::Key: Hash,
Self::Key: Eq, [src]
fn insert<K, V>(
&mut self,
k: K,
v: V
) -> Result<Option<Self::Target>, AccessError> where
V: Into<Self::Target>,
K: Into<Self::Key>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to insert into this Value as an Object.
Will return an AccessError::NotAnObject if called
on a Value that isn’t an object - otherwise will
behave the same as HashMap::insert Read more
fn remove<Q>(&mut self, k: &Q) -> Result<Option<Self::Target>, AccessError> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
fn remove<Q>(&mut self, k: &Q) -> Result<Option<Self::Target>, AccessError> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to remove from this Value as an Object.
Will return an AccessError::NotAnObject if called
on a Value that isn’t an object - otherwise will
behave the same as HashMap::remove Read more
fn push<V>(&mut self, v: V) -> Result<(), AccessError> where
V: Into<Self::Target>, [src]
fn push<V>(&mut self, v: V) -> Result<(), AccessError> where
V: Into<Self::Target>, [src]Tries to push to this Value as an Array.
Will return an AccessError::NotAnArray if called
on a Value that isn’t an Array - otherwise will
behave the same as Vec::push Read more
fn pop(&mut self) -> Result<Option<Self::Target>, AccessError>[src]
fn pop(&mut self) -> Result<Option<Self::Target>, AccessError>[src]Tries to pop from this Value as an Array.
Will return an AccessError::NotAnArray if called
on a Value that isn’t an Array - otherwise will
behave the same as Vec::pop Read more
fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Target> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Self::Target> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Same as get but returns a mutable ref instead
fn get_idx_mut(&mut self, i: usize) -> Option<&mut Self::Target>[src]
fn get_idx_mut(&mut self, i: usize) -> Option<&mut Self::Target>[src]Same as get_idx but returns a mutable ref instead
impl<'v, K, T, S> PartialEq<HashMap<K, T, S>> for Value<'v> where
K: AsRef<str> + Hash + Eq,
Value<'v>: PartialEq<T>,
S: BuildHasher, [src]
impl<'v, K, T, S> PartialEq<HashMap<K, T, S>> for Value<'v> where
K: AsRef<str> + Hash + Eq,
Value<'v>: PartialEq<T>,
S: BuildHasher, [src]impl<'value> TryFrom<Value> for BorrowedValue<'value>[src]
impl<'value> TryFrom<Value> for BorrowedValue<'value>[src]type Error = SerdeConversionError
type Error = SerdeConversionErrorThe type returned in the event of a conversion error.
fn try_from(item: Value) -> Result<Self, SerdeConversionError>[src]
fn try_from(item: Value) -> Result<Self, SerdeConversionError>[src]Performs the conversion.
impl<'value> TryInto<Value> for BorrowedValue<'value>[src]
impl<'value> TryInto<Value> for BorrowedValue<'value>[src]type Error = SerdeConversionError
type Error = SerdeConversionErrorThe type returned in the event of a conversion error.
fn try_into(self) -> Result<Value, SerdeConversionError>[src]
fn try_into(self) -> Result<Value, SerdeConversionError>[src]Performs the conversion.
impl<'value> Value for Value<'value>[src]
impl<'value> Value for Value<'value>[src]#[must_use]fn value_type(&self) -> ValueType[src]
#[must_use]fn value_type(&self) -> ValueType[src]Returns the type of the current Valye
#[must_use]fn is_integer(&self) -> bool[src]
#[must_use]fn is_integer(&self) -> bool[src]returns true if the current value a integer number
#[must_use]fn is_number(&self) -> bool[src]
#[must_use]fn is_number(&self) -> bool[src]returns true if the current value a number either float or integer
#[must_use]fn is_i128(&self) -> bool[src]
#[must_use]fn is_i128(&self) -> bool[src]returns true if the current value can be represented as a i128
#[must_use]fn is_i64(&self) -> bool[src]
#[must_use]fn is_i64(&self) -> bool[src]returns true if the current value can be represented as a i64
#[must_use]fn is_i32(&self) -> bool[src]
#[must_use]fn is_i32(&self) -> bool[src]returns true if the current value can be represented as a i32
#[must_use]fn is_i16(&self) -> bool[src]
#[must_use]fn is_i16(&self) -> bool[src]returns true if the current value can be represented as a i16
#[must_use]fn is_u128(&self) -> bool[src]
#[must_use]fn is_u128(&self) -> bool[src]returns true if the current value can be represented as a u128
#[must_use]fn is_u64(&self) -> bool[src]
#[must_use]fn is_u64(&self) -> bool[src]returns true if the current value can be represented as a u64
#[must_use]fn is_usize(&self) -> bool[src]
#[must_use]fn is_usize(&self) -> bool[src]returns true if the current value can be represented as a usize
#[must_use]fn is_u32(&self) -> bool[src]
#[must_use]fn is_u32(&self) -> bool[src]returns true if the current value can be represented as a u32
#[must_use]fn is_u16(&self) -> bool[src]
#[must_use]fn is_u16(&self) -> bool[src]returns true if the current value can be represented as a u16
#[must_use]fn is_f64(&self) -> bool[src]
#[must_use]fn is_f64(&self) -> bool[src]returns true if the current value can be represented as a f64
#[must_use]fn is_f64_castable(&self) -> bool[src]
#[must_use]fn is_f64_castable(&self) -> bool[src]returns true if the current value can be cast into a f64
#[must_use]fn is_f32(&self) -> bool[src]
#[must_use]fn is_f32(&self) -> bool[src]returns true if the current value can be represented as a f64
#[must_use]fn is_str(&self) -> bool[src]
#[must_use]fn is_str(&self) -> bool[src]returns true if the current value can be represented as a str
impl<'value> ValueAccess for Value<'value>[src]
impl<'value> ValueAccess for Value<'value>[src]type Target = Self
type Target = SelfThe target for nested lookups
#[must_use]fn cast_f64(&self) -> Option<f64>[src]
#[must_use]fn cast_f64(&self) -> Option<f64>[src]Casts the current value to a f64 if possible, this will turn integer values into floats. Read more
#[must_use]fn as_array(&self) -> Option<&Vec<Value<'value>>>[src]
#[must_use]fn as_array(&self) -> Option<&Vec<Value<'value>>>[src]Tries to represent the value as an array and returns a refference to it
#[must_use]fn as_object(&self) -> Option<&HashMap<Self::Key, Self>>[src]
#[must_use]fn as_object(&self) -> Option<&HashMap<Self::Key, Self>>[src]Tries to represent the value as an object and returns a refference to it
#[must_use]fn get<Q>(&self, k: &Q) -> Option<&Self::Target> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get<Q>(&self, k: &Q) -> Option<&Self::Target> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Gets a ref to a value based on a key, returns None if the
current Value isn’t an Object or doesn’t contain the key
it was asked for. Read more
#[must_use]fn contains_key<Q>(&self, k: &Q) -> bool where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn contains_key<Q>(&self, k: &Q) -> bool where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Checks if a Value contains a given key. This will return flase if Value isn’t an object Read more
#[must_use]fn get_idx(&self, i: usize) -> Option<&Self::Target>[src]
#[must_use]fn get_idx(&self, i: usize) -> Option<&Self::Target>[src]Gets a ref to a value based on n index, returns None if the
current Value isn’t an Array or doesn’t contain the index
it was asked for. Read more
#[must_use]fn get_bool<Q>(&self, k: &Q) -> Option<bool> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_bool<Q>(&self, k: &Q) -> Option<bool> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a bool
#[must_use]fn get_i128<Q>(&self, k: &Q) -> Option<i128> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_i128<Q>(&self, k: &Q) -> Option<i128> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a i128
#[must_use]fn get_i64<Q>(&self, k: &Q) -> Option<i64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_i64<Q>(&self, k: &Q) -> Option<i64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a i64
#[must_use]fn get_i32<Q>(&self, k: &Q) -> Option<i32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_i32<Q>(&self, k: &Q) -> Option<i32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a i32
#[must_use]fn get_i16<Q>(&self, k: &Q) -> Option<i16> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_i16<Q>(&self, k: &Q) -> Option<i16> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a i16
#[must_use]fn get_i8<Q>(&self, k: &Q) -> Option<i8> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_i8<Q>(&self, k: &Q) -> Option<i8> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a i8
#[must_use]fn get_u128<Q>(&self, k: &Q) -> Option<u128> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_u128<Q>(&self, k: &Q) -> Option<u128> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a u128
#[must_use]fn get_u64<Q>(&self, k: &Q) -> Option<u64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_u64<Q>(&self, k: &Q) -> Option<u64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a u64
#[must_use]fn get_usize<Q>(&self, k: &Q) -> Option<usize> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_usize<Q>(&self, k: &Q) -> Option<usize> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a usize
#[must_use]fn get_u32<Q>(&self, k: &Q) -> Option<u32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_u32<Q>(&self, k: &Q) -> Option<u32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a u32
#[must_use]fn get_u16<Q>(&self, k: &Q) -> Option<u16> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_u16<Q>(&self, k: &Q) -> Option<u16> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a u16
#[must_use]fn get_u8<Q>(&self, k: &Q) -> Option<u8> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_u8<Q>(&self, k: &Q) -> Option<u8> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a u8
#[must_use]fn get_f64<Q>(&self, k: &Q) -> Option<f64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_f64<Q>(&self, k: &Q) -> Option<f64> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a f64
#[must_use]fn get_f32<Q>(&self, k: &Q) -> Option<f32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_f32<Q>(&self, k: &Q) -> Option<f32> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a f32
#[must_use]fn get_str<Q>(&self, k: &Q) -> Option<&str> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]
#[must_use]fn get_str<Q>(&self, k: &Q) -> Option<&str> where
Q: Hash + Eq + Ord + ?Sized,
Self::Key: Borrow<Q>,
Self::Key: Hash,
Self::Key: Eq, [src]Tries to get an element of an object as a str
impl<'value> Writable for Value<'value>[src]
impl<'value> Writable for Value<'value>[src]Auto Trait Implementations
impl<'value> RefUnwindSafe for Value<'value>
impl<'value> Send for Value<'value>
impl<'value> Sync for Value<'value>
impl<'value> Unpin for Value<'value>
impl<'value> UnwindSafe for Value<'value>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more