pub enum Value<'value> {
Static(StaticNode),
String(Cow<'value, str>),
Array(Vec<Value<'value>>),
Object(Box<Object<'value>>),
Bytes(Bytes<'value>),
}
Expand description
Borrowed JSON-DOM Value, consider using the ValueTrait
to access its content
Variants§
Static(StaticNode)
Static values
String(Cow<'value, str>)
string type
Array(Vec<Value<'value>>)
array type
Object(Box<Object<'value>>)
object type
Bytes(Bytes<'value>)
A binary type
Implementations§
source§impl<'value> Value<'value>
impl<'value> Value<'value>
sourcepub const fn const_null() -> Value<'static>
pub const fn const_null() -> Value<'static>
Creates a constant null value
sourcepub const fn const_true() -> Value<'static>
pub const fn const_true() -> Value<'static>
Creates a constant true value
sourcepub const fn const_false() -> Value<'static>
pub const fn const_false() -> Value<'static>
Creates a constant false value
source§impl<'value> Value<'value>
impl<'value> Value<'value>
sourcepub fn into_static(self) -> Value<'static>
pub fn into_static(self) -> Value<'static>
Enforces static lifetime on a borrowed value, this will force all strings to become owned COW’s, the same applies for Object keys.
sourcepub fn clone_static(&self) -> Value<'static>
pub fn clone_static(&self) -> Value<'static>
Clones the current value and enforces a static lifetime, it works the same
as into_static
but includes cloning logic
sourcepub fn try_as_bytes(&self) -> Result<&[u8], TryTypeError>
pub fn try_as_bytes(&self) -> Result<&[u8], TryTypeError>
Trait Implementations§
source§impl AsRef<Value<'static>> for StaticValue
impl AsRef<Value<'static>> for StaticValue
source§impl<'de> Deserialize<'de> for Value<'de>
impl<'de> Deserialize<'de> for Value<'de>
source§fn deserialize<D>(deserializer: D) -> Result<Value<'de>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Value<'de>, D::Error>where
D: Deserializer<'de>,
source§impl<'input> Deserialize<'input> for Value<'input>
impl<'input> Deserialize<'input> for Value<'input>
fn from_tape(tape: &mut Tape<'input>) -> Result<Self>where
Self: Sized + 'input,
fn from_slice(json: &'input mut [u8]) -> Result<Self, Error>where
Self: Sized + 'input,
fn from_slice_with_buffers(
json: &'input mut [u8],
buffers: &mut Buffers,
) -> Result<Self, Error>where
Self: Sized + 'input,
fn from_str(json: &'input mut str) -> Result<Self, Error>where
Self: Sized + 'input,
source§impl<'de> Deserializer<'de> for Value<'de>
impl<'de> Deserializer<'de> for Value<'de>
source§type Error = Error
type Error = Error
source§fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read moresource§fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an optional value. Read moresource§fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting a struct with a particular
name and fields.source§fn deserialize_enum<V>(
self,
name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an enum value with a
particular name and possible variants.source§fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a bool
value.source§fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i8
value.source§fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i16
value.source§fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i32
value.source§fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i64
value.source§fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
source§fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u8
value.source§fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u16
value.source§fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u32
value.source§fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u64
value.source§fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
source§fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f32
value.source§fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f64
value.source§fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a char
value.source§fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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 moresource§fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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 moresource§fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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 moresource§fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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 moresource§fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit value.source§fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit struct with a
particular name.source§fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a newtype struct with a
particular name.source§fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values.source§fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self 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.source§fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a tuple struct with a
particular name and number of fields.source§fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a map of key-value pairs.source§fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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.source§fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self 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 moresource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize
implementations should expect to
deserialize their human-readable form. Read moresource§impl<'value> From<Value<'value>> for Value<'value>
impl<'value> From<Value<'value>> for Value<'value>
source§fn from(b: BorrowedValue<'value>) -> Self
fn from(b: BorrowedValue<'value>) -> Self
source§impl<'value> From<Value> for Value<'value>
impl<'value> From<Value> for Value<'value>
source§fn from(b: OwnedValue) -> Self
fn from(b: OwnedValue) -> Self
source§impl<'value> From<SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>> for Value<'value>
impl<'value> From<SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>> for Value<'value>
source§impl<'value> From<StaticNode> for Value<'value>
impl<'value> From<StaticNode> for Value<'value>
source§fn from(s: StaticNode) -> Self
fn from(s: StaticNode) -> Self
source§impl From<Value<'static>> for StaticValue
impl From<Value<'static>> for StaticValue
source§impl<'value> From<Value<'value>> for BorrowedValue<'value>
impl<'value> From<Value<'value>> for BorrowedValue<'value>
source§fn from(other: Value<'value>) -> BorrowedValue<'value>
fn from(other: Value<'value>) -> BorrowedValue<'value>
source§impl<'value> From<Value<'value>> for OwnedValue
impl<'value> From<Value<'value>> for OwnedValue
source§fn from(other: Value<'value>) -> OwnedValue
fn from(other: Value<'value>) -> OwnedValue
source§impl<'value, K: Into<Cow<'value, str>>, V: Into<Value<'value>>> FromIterator<(K, V)> for Value<'value>
impl<'value, K: Into<Cow<'value, str>>, V: Into<Value<'value>>> FromIterator<(K, V)> for Value<'value>
source§impl<'value, V: Into<Value<'value>>> FromIterator<V> for Value<'value>
impl<'value, V: Into<Value<'value>>> FromIterator<V> for Value<'value>
source§fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
source§impl<'de> IntoDeserializer<'de, Error> for Value<'de>
impl<'de> IntoDeserializer<'de, Error> for Value<'de>
source§type Deserializer = Value<'de>
type Deserializer = Value<'de>
source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
source§impl<'value> Ord for Value<'value>
impl<'value> Ord for Value<'value>
source§impl<'value> PartialOrd for Value<'value>
impl<'value> PartialOrd for Value<'value>
source§impl<'value> TypedCustomValue for Value<'value>
impl<'value> TypedCustomValue for Value<'value>
source§impl<'value> TypedValue for Value<'value>
impl<'value> TypedValue for Value<'value>
source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
source§impl<'value> ValueAsContainer for Value<'value>
impl<'value> ValueAsContainer for Value<'value>
source§impl<'value> ValueAsMutContainer for Value<'value>
impl<'value> ValueAsMutContainer for Value<'value>
source§type Object = SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>
type Object = SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>
The type for Objects
source§fn as_array_mut(&mut self) -> Option<&mut Vec<Value<'value>>>
fn as_array_mut(&mut self) -> Option<&mut Vec<Value<'value>>>
source§fn as_object_mut(&mut self) -> Option<&mut Object<'value>>
fn as_object_mut(&mut self) -> Option<&mut Object<'value>>
source§impl<'value> ValueAsScalar for Value<'value>
impl<'value> ValueAsScalar for Value<'value>
source§impl<'value> ValueBuilder<'value> for Value<'value>
impl<'value> ValueBuilder<'value> for Value<'value>
source§fn array_with_capacity(capacity: usize) -> Self
fn array_with_capacity(capacity: usize) -> Self
source§fn object_with_capacity(capacity: usize) -> Self
fn object_with_capacity(capacity: usize) -> Self
source§impl<'value> ValueIntoContainer for Value<'value>
impl<'value> ValueIntoContainer for Value<'value>
source§type Object = SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>
type Object = SizedHashMap<Cow<'value, str, Wide>, Value<'value>, NotSoRandomState>
source§fn into_array(self) -> Option<Vec<Value<'value>>>
fn into_array(self) -> Option<Vec<Value<'value>>>
source§fn into_object(self) -> Option<Object<'value>>
fn into_object(self) -> Option<Object<'value>>
source§impl<'value> ValueIntoString for Value<'value>
impl<'value> ValueIntoString for Value<'value>
source§impl<'value> Writable for Value<'value>
impl<'value> Writable for Value<'value>
impl<'value> Eq for Value<'value>
Auto Trait Implementations§
impl<'value> Freeze for Value<'value>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> TypedContainerValue for Twhere
T: ValueAsContainer,
impl<T> TypedContainerValue for Twhere
T: ValueAsContainer,
source§impl<T> TypedScalarValue for Twhere
T: ValueAsScalar,
impl<T> TypedScalarValue for Twhere
T: ValueAsScalar,
source§fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
source§fn is_f64_castable(&self) -> bool
fn is_f64_castable(&self) -> bool
source§impl<T> ValueArrayAccess for Twhere
T: ValueAsContainer,
impl<T> ValueArrayAccess for Twhere
T: ValueAsContainer,
source§impl<T> ValueArrayTryAccess for Twhere
T: ValueTryAsContainer,
impl<T> ValueArrayTryAccess for Twhere
T: ValueTryAsContainer,
source§fn try_get_idx(
&self,
i: usize,
) -> Result<Option<&<T as ValueArrayTryAccess>::Target>, TryTypeError>
fn try_get_idx( &self, i: usize, ) -> Result<Option<&<T as ValueArrayTryAccess>::Target>, TryTypeError>
Tries to get a value based on n index, returns a type error if the
current value isn’t an Array, returns None
if the index is out of bounds
§Errors
if the requested type doesn’t match the actual type or the value is not an object
source§impl<T> ValueObjectAccess for Twhere
T: ValueAsContainer,
impl<T> ValueObjectAccess for Twhere
T: ValueAsContainer,
source§type Target = <<T as ValueAsContainer>::Object as Object>::Element
type Target = <<T as ValueAsContainer>::Object as Object>::Element
source§impl<T> ValueObjectAccessTryAsContainer for Twhere
T: ValueObjectTryAccess + TypedValue,
<T as ValueObjectTryAccess>::Target: ValueTryAsContainer,
impl<T> ValueObjectAccessTryAsContainer for Twhere
T: ValueObjectTryAccess + TypedValue,
<T as ValueObjectTryAccess>::Target: ValueTryAsContainer,
source§type Key = <T as ValueObjectTryAccess>::Key
type Key = <T as ValueObjectTryAccess>::Key
source§type Target = <T as ValueObjectTryAccess>::Target
type Target = <T as ValueObjectTryAccess>::Target
source§type Array = <<T as ValueObjectTryAccess>::Target as ValueTryAsContainer>::Array
type Array = <<T as ValueObjectTryAccess>::Target as ValueTryAsContainer>::Array
source§type Object = <<T as ValueObjectTryAccess>::Target as ValueTryAsContainer>::Object
type Object = <<T as ValueObjectTryAccess>::Target as ValueTryAsContainer>::Object
source§fn try_get_array<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectAccessTryAsContainer>::Array>, TryTypeError>
fn try_get_array<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectAccessTryAsContainer>::Array>, TryTypeError>
source§fn try_get_object<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectAccessTryAsContainer>::Object>, TryTypeError>
fn try_get_object<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectAccessTryAsContainer>::Object>, TryTypeError>
source§impl<T> ValueObjectAccessTryAsScalar for T
impl<T> ValueObjectAccessTryAsScalar for T
source§type Key = <T as ValueObjectTryAccess>::Key
type Key = <T as ValueObjectTryAccess>::Key
source§fn try_get_bool<Q>(&self, k: &Q) -> Result<Option<bool>, TryTypeError>
fn try_get_bool<Q>(&self, k: &Q) -> Result<Option<bool>, TryTypeError>
source§fn try_get_i128<Q>(&self, k: &Q) -> Result<Option<i128>, TryTypeError>
fn try_get_i128<Q>(&self, k: &Q) -> Result<Option<i128>, TryTypeError>
source§fn try_get_i64<Q>(&self, k: &Q) -> Result<Option<i64>, TryTypeError>
fn try_get_i64<Q>(&self, k: &Q) -> Result<Option<i64>, TryTypeError>
source§fn try_get_i32<Q>(&self, k: &Q) -> Result<Option<i32>, TryTypeError>
fn try_get_i32<Q>(&self, k: &Q) -> Result<Option<i32>, TryTypeError>
source§fn try_get_i16<Q>(&self, k: &Q) -> Result<Option<i16>, TryTypeError>
fn try_get_i16<Q>(&self, k: &Q) -> Result<Option<i16>, TryTypeError>
source§fn try_get_i8<Q>(&self, k: &Q) -> Result<Option<i8>, TryTypeError>
fn try_get_i8<Q>(&self, k: &Q) -> Result<Option<i8>, TryTypeError>
source§fn try_get_u128<Q>(&self, k: &Q) -> Result<Option<u128>, TryTypeError>
fn try_get_u128<Q>(&self, k: &Q) -> Result<Option<u128>, TryTypeError>
source§fn try_get_u64<Q>(&self, k: &Q) -> Result<Option<u64>, TryTypeError>
fn try_get_u64<Q>(&self, k: &Q) -> Result<Option<u64>, TryTypeError>
source§fn try_get_usize<Q>(&self, k: &Q) -> Result<Option<usize>, TryTypeError>
fn try_get_usize<Q>(&self, k: &Q) -> Result<Option<usize>, TryTypeError>
source§fn try_get_u32<Q>(&self, k: &Q) -> Result<Option<u32>, TryTypeError>
fn try_get_u32<Q>(&self, k: &Q) -> Result<Option<u32>, TryTypeError>
source§fn try_get_u16<Q>(&self, k: &Q) -> Result<Option<u16>, TryTypeError>
fn try_get_u16<Q>(&self, k: &Q) -> Result<Option<u16>, TryTypeError>
source§fn try_get_u8<Q>(&self, k: &Q) -> Result<Option<u8>, TryTypeError>
fn try_get_u8<Q>(&self, k: &Q) -> Result<Option<u8>, TryTypeError>
source§fn try_get_f64<Q>(&self, k: &Q) -> Result<Option<f64>, TryTypeError>
fn try_get_f64<Q>(&self, k: &Q) -> Result<Option<f64>, TryTypeError>
source§fn try_get_f32<Q>(&self, k: &Q) -> Result<Option<f32>, TryTypeError>
fn try_get_f32<Q>(&self, k: &Q) -> Result<Option<f32>, TryTypeError>
source§impl<T> ValueObjectTryAccess for Twhere
T: ValueTryAsContainer,
impl<T> ValueObjectTryAccess for Twhere
T: ValueTryAsContainer,
source§type Target = <<T as ValueTryAsContainer>::Object as Object>::Element
type Target = <<T as ValueTryAsContainer>::Object as Object>::Element
source§fn try_get<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectTryAccess>::Target>, TryTypeError>
fn try_get<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectTryAccess>::Target>, TryTypeError>
TryTypeError
if the
current Value isn’t an Object, returns None
if the key isn’t in the object Read moresource§impl<T> ValueTryAsContainer for Twhere
T: ValueAsContainer + TypedValue,
impl<T> ValueTryAsContainer for Twhere
T: ValueAsContainer + TypedValue,
source§type Array = <T as ValueAsContainer>::Array
type Array = <T as ValueAsContainer>::Array
source§type Object = <T as ValueAsContainer>::Object
type Object = <T as ValueAsContainer>::Object
source§fn try_as_array(
&self,
) -> Result<&<T as ValueTryAsContainer>::Array, TryTypeError>
fn try_as_array( &self, ) -> Result<&<T as ValueTryAsContainer>::Array, TryTypeError>
source§fn try_as_object(
&self,
) -> Result<&<T as ValueTryAsContainer>::Object, TryTypeError>
fn try_as_object( &self, ) -> Result<&<T as ValueTryAsContainer>::Object, TryTypeError>
source§impl<T> ValueTryAsScalar for Twhere
T: ValueAsScalar + TypedValue,
impl<T> ValueTryAsScalar for Twhere
T: ValueAsScalar + TypedValue,
source§fn try_as_bool(&self) -> Result<bool, TryTypeError>
fn try_as_bool(&self) -> Result<bool, TryTypeError>
source§fn try_as_i128(&self) -> Result<i128, TryTypeError>
fn try_as_i128(&self) -> Result<i128, TryTypeError>
source§fn try_as_i64(&self) -> Result<i64, TryTypeError>
fn try_as_i64(&self) -> Result<i64, TryTypeError>
source§fn try_as_i32(&self) -> Result<i32, TryTypeError>
fn try_as_i32(&self) -> Result<i32, TryTypeError>
source§fn try_as_i16(&self) -> Result<i16, TryTypeError>
fn try_as_i16(&self) -> Result<i16, TryTypeError>
source§fn try_as_i8(&self) -> Result<i8, TryTypeError>
fn try_as_i8(&self) -> Result<i8, TryTypeError>
source§fn try_as_u128(&self) -> Result<u128, TryTypeError>
fn try_as_u128(&self) -> Result<u128, TryTypeError>
source§fn try_as_u64(&self) -> Result<u64, TryTypeError>
fn try_as_u64(&self) -> Result<u64, TryTypeError>
source§fn try_as_usize(&self) -> Result<usize, TryTypeError>
fn try_as_usize(&self) -> Result<usize, TryTypeError>
source§fn try_as_u32(&self) -> Result<u32, TryTypeError>
fn try_as_u32(&self) -> Result<u32, TryTypeError>
source§fn try_as_u16(&self) -> Result<u16, TryTypeError>
fn try_as_u16(&self) -> Result<u16, TryTypeError>
source§fn try_as_u8(&self) -> Result<u8, TryTypeError>
fn try_as_u8(&self) -> Result<u8, TryTypeError>
source§fn try_as_f64(&self) -> Result<f64, TryTypeError>
fn try_as_f64(&self) -> Result<f64, TryTypeError>
source§fn try_cast_f64(&self) -> Result<f64, TryTypeError>
fn try_cast_f64(&self) -> Result<f64, TryTypeError>
source§fn try_as_f32(&self) -> Result<f32, TryTypeError>
fn try_as_f32(&self) -> Result<f32, TryTypeError>
source§fn try_as_str(&self) -> Result<&str, TryTypeError>
fn try_as_str(&self) -> Result<&str, TryTypeError>
source§fn try_as_char(&self) -> Result<char, TryTypeError>
fn try_as_char(&self) -> Result<char, TryTypeError>
source§impl<T> ValueTryIntoContainer for Twhere
T: ValueIntoContainer + TypedValue,
impl<T> ValueTryIntoContainer for Twhere
T: ValueIntoContainer + TypedValue,
source§fn try_into_array(
self,
) -> Result<<T as ValueTryIntoContainer>::Array, TryTypeError>
fn try_into_array( self, ) -> Result<<T as ValueTryIntoContainer>::Array, TryTypeError>
Tries to turn the value into it’s array representation
§Errors
if the requested type doesn’t match the actual type
source§fn try_into_object(
self,
) -> Result<<T as ValueTryIntoContainer>::Object, TryTypeError>
fn try_into_object( self, ) -> Result<<T as ValueTryIntoContainer>::Object, TryTypeError>
Tries to turn the value into it’s object representation
§Errors
if the requested type doesn’t match the actual type