pub type Result<T> = Result<T, Error>;Expand description
simd-json Result type
Aliased Type§
enum Result<T> {
Ok(T),
Err(Error),
}Variants§
Trait Implementations§
source§impl<V, E> ValueAccess for Result<V, E>where
V: ValueAccess,
impl<V, E> ValueAccess for Result<V, E>where V: ValueAccess,
§type Target = <V as ValueAccess>::Target
type Target = <V as ValueAccess>::Target
The target for nested lookups
§type Key = <V as ValueAccess>::Key
type Key = <V as ValueAccess>::Key
The type for Objects
§type Array = <V as ValueAccess>::Array
type Array = <V as ValueAccess>::Array
The array structure
§type Object = <V as ValueAccess>::Object
type Object = <V as ValueAccess>::Object
The object structure
source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Gets the type of the current value
source§fn as_array(&self) -> Option<&<Result<V, E> as ValueAccess>::Array>
fn as_array(&self) -> Option<&<Result<V, E> as ValueAccess>::Array>
Tries to represent the value as an array and returns a refference to it
source§fn as_object(&self) -> Option<&<Result<V, E> as ValueAccess>::Object>
fn as_object(&self) -> Option<&<Result<V, E> as ValueAccess>::Object>
Tries to represent the value as an object and returns a refference to it
source§fn try_as_bool(&self) -> Result<bool, TryTypeError>
fn try_as_bool(&self) -> Result<bool, TryTypeError>
Tries to represent the value as a bool Read more
source§fn try_as_i128(&self) -> Result<i128, TryTypeError>
fn try_as_i128(&self) -> Result<i128, TryTypeError>
Tries to represent the value as a i128 Read more
source§fn try_as_i64(&self) -> Result<i64, TryTypeError>
fn try_as_i64(&self) -> Result<i64, TryTypeError>
Tries to represent the value as an i64 Read more
source§fn try_as_i32(&self) -> Result<i32, TryTypeError>
fn try_as_i32(&self) -> Result<i32, TryTypeError>
Tries to represent the value as an i32 Read more
source§fn try_as_i16(&self) -> Result<i16, TryTypeError>
fn try_as_i16(&self) -> Result<i16, TryTypeError>
Tries to represent the value as an i16 Read more
source§fn try_as_i8(&self) -> Result<i8, TryTypeError>
fn try_as_i8(&self) -> Result<i8, TryTypeError>
Tries to represent the value as an i8 Read more
source§fn try_as_u128(&self) -> Result<u128, TryTypeError>
fn try_as_u128(&self) -> Result<u128, TryTypeError>
Tries to represent the value as an u128 Read more
source§fn try_as_u64(&self) -> Result<u64, TryTypeError>
fn try_as_u64(&self) -> Result<u64, TryTypeError>
Tries to represent the value as an u64 Read more
source§fn try_as_usize(&self) -> Result<usize, TryTypeError>
fn try_as_usize(&self) -> Result<usize, TryTypeError>
Tries to represent the value as an usize Read more
source§fn try_as_u32(&self) -> Result<u32, TryTypeError>
fn try_as_u32(&self) -> Result<u32, TryTypeError>
Tries to represent the value as an u32 Read more
source§fn try_as_u16(&self) -> Result<u16, TryTypeError>
fn try_as_u16(&self) -> Result<u16, TryTypeError>
Tries to represent the value as an u16 Read more
source§fn try_as_u8(&self) -> Result<u8, TryTypeError>
fn try_as_u8(&self) -> Result<u8, TryTypeError>
Tries to represent the value as an u8 Read more
source§fn try_as_f64(&self) -> Result<f64, TryTypeError>
fn try_as_f64(&self) -> Result<f64, TryTypeError>
Tries to represent the value as a f64 Read more
source§fn cast_f64(&self) -> Option<f64>
fn cast_f64(&self) -> Option<f64>
Casts the current value to a f64 if possible, this will turn integer
values into floats.
source§fn try_cast_f64(&self) -> Result<f64, TryTypeError>
fn try_cast_f64(&self) -> Result<f64, TryTypeError>
Tries to Casts the current value to a f64 if possible, this will turn integer
values into floats and error if it isn’t possible Read more
source§fn try_as_f32(&self) -> Result<f32, TryTypeError>
fn try_as_f32(&self) -> Result<f32, TryTypeError>
Tries to represent the value as a f32 Read more
source§fn try_as_str(&self) -> Result<&str, TryTypeError>
fn try_as_str(&self) -> Result<&str, TryTypeError>
Tries to represent the value as a &str Read more
source§fn try_as_char(&self) -> Result<char, TryTypeError>
fn try_as_char(&self) -> Result<char, TryTypeError>
Tries to represent the value as a Char Read more
source§fn try_as_array(&self) -> Result<&Self::Array, TryTypeError>
fn try_as_array(&self) -> Result<&Self::Array, TryTypeError>
Tries to represent the value as an array and returns a refference to it Read more
source§fn try_as_object(&self) -> Result<&Self::Object, TryTypeError>
fn try_as_object(&self) -> Result<&Self::Object, TryTypeError>
Tries to represent the value as an object and returns a refference to it Read more
source§fn get_idx(&self, i: usize) -> Option<&Self::Target>
fn get_idx(&self, i: usize) -> Option<&Self::Target>
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.source§fn try_get_idx(&self, i: usize) -> Result<Option<&Self::Target>, TryTypeError>
fn try_get_idx(&self, i: usize) -> Result<Option<&Self::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 bouds Read moresource§impl<V, E> ValueInto for Result<V, E>where
V: ValueInto,
impl<V, E> ValueInto for Result<V, E>where V: ValueInto,
source§fn into_string(self) -> Option<<Result<V, E> as ValueInto>::String>
fn into_string(self) -> Option<<Result<V, E> as ValueInto>::String>
Tries to turn the value into it’s string representation
source§fn into_array(self) -> Option<<Result<V, E> as ValueAccess>::Array>
fn into_array(self) -> Option<<Result<V, E> as ValueAccess>::Array>
Tries to turn the value into it’s array representation
source§fn into_object(self) -> Option<<Result<V, E> as ValueAccess>::Object>
fn into_object(self) -> Option<<Result<V, E> as ValueAccess>::Object>
Tries to turn the value into it’s object representation
source§fn try_into_string(self) -> Result<Self::String, TryTypeError>
fn try_into_string(self) -> Result<Self::String, TryTypeError>
Tries to turn the value into it’s string representation Read more
source§fn try_into_array(self) -> Result<Self::Array, TryTypeError>
fn try_into_array(self) -> Result<Self::Array, TryTypeError>
Tries to turn the value into it’s array representation Read more
source§fn try_into_object(self) -> Result<Self::Object, TryTypeError>
fn try_into_object(self) -> Result<Self::Object, TryTypeError>
Tries to turn the value into it’s object representation Read more