Type Alias simd_json::Result

source ·
pub type Result<T> = Result<T, Error>;
Expand description

simd-json Result type

Aliased Type§

enum Result<T> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

source§

impl<V, E> ValueAccess for Result<V, E>where V: ValueAccess,

§

type Target = <V as ValueAccess>::Target

The target for nested lookups
§

type Key = <V as ValueAccess>::Key

The type for Objects
§

type Array = <V as ValueAccess>::Array

The array structure
§

type Object = <V as ValueAccess>::Object

The object structure
source§

fn value_type(&self) -> ValueType

Gets the type of the current value
source§

fn as_bool(&self) -> Option<bool>

Tries to represent the value as a bool
source§

fn as_i64(&self) -> Option<i64>

Tries to represent the value as an i64
source§

fn as_u64(&self) -> Option<u64>

Tries to represent the value as an u64
source§

fn as_f64(&self) -> Option<f64>

Tries to represent the value as a f64
source§

fn as_str(&self) -> Option<&str>

Tries to represent the value as a &str
source§

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>

Tries to represent the value as an object and returns a refference to it
source§

fn try_as_bool(&self) -> Result<bool, TryTypeError>

Tries to represent the value as a bool Read more
source§

fn as_i128(&self) -> Option<i128>

Tries to represent the value as an i128
source§

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>

Tries to represent the value as an i64 Read more
source§

fn as_i32(&self) -> Option<i32>

Tries to represent the value as an i32
source§

fn try_as_i32(&self) -> Result<i32, TryTypeError>

Tries to represent the value as an i32 Read more
source§

fn as_i16(&self) -> Option<i16>

Tries to represent the value as an i16
source§

fn try_as_i16(&self) -> Result<i16, TryTypeError>

Tries to represent the value as an i16 Read more
source§

fn as_i8(&self) -> Option<i8>

Tries to represent the value as an i8
source§

fn try_as_i8(&self) -> Result<i8, TryTypeError>

Tries to represent the value as an i8 Read more
source§

fn as_u128(&self) -> Option<u128>

Tries to represent the value as an u128
source§

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>

Tries to represent the value as an u64 Read more
source§

fn as_usize(&self) -> Option<usize>

Tries to represent the value as an usize
source§

fn try_as_usize(&self) -> Result<usize, TryTypeError>

Tries to represent the value as an usize Read more
source§

fn as_u32(&self) -> Option<u32>

Tries to represent the value as an u32
source§

fn try_as_u32(&self) -> Result<u32, TryTypeError>

Tries to represent the value as an u32 Read more
source§

fn as_u16(&self) -> Option<u16>

Tries to represent the value as an u16
source§

fn try_as_u16(&self) -> Result<u16, TryTypeError>

Tries to represent the value as an u16 Read more
source§

fn as_u8(&self) -> Option<u8>

Tries to represent the value as an u8
source§

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>

Tries to represent the value as a f64 Read more
source§

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>

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 as_f32(&self) -> Option<f32>

Tries to represent the value as a f32
source§

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>

Tries to represent the value as a &str Read more
source§

fn as_char(&self) -> Option<char>

Tries to represent the value as a Char
source§

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>

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>

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>

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>

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 more
source§

impl<V, E> ValueInto for Result<V, E>where V: ValueInto,

§

type String = <V as ValueInto>::String

The type for Strings
source§

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>

Tries to turn the value into it’s array representation
source§

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>

Tries to turn the value into it’s string representation Read more
source§

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>

Tries to turn the value into it’s object representation Read more