simd_json::derived

Trait ValueObjectAccessAsScalar

Source
pub trait ValueObjectAccessAsScalar {
    type Key: ?Sized;

Show 15 methods // Required methods fn get_bool<Q>(&self, k: &Q) -> Option<bool> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_i128<Q>(&self, k: &Q) -> Option<i128> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_i64<Q>(&self, k: &Q) -> Option<i64> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_i32<Q>(&self, k: &Q) -> Option<i32> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_i16<Q>(&self, k: &Q) -> Option<i16> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_i8<Q>(&self, k: &Q) -> Option<i8> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_u128<Q>(&self, k: &Q) -> Option<u128> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_u64<Q>(&self, k: &Q) -> Option<u64> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_usize<Q>(&self, k: &Q) -> Option<usize> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_u32<Q>(&self, k: &Q) -> Option<u32> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_u16<Q>(&self, k: &Q) -> Option<u16> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_u8<Q>(&self, k: &Q) -> Option<u8> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_f64<Q>(&self, k: &Q) -> Option<f64> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_f32<Q>(&self, k: &Q) -> Option<f32> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized; fn get_str<Q>(&self, k: &Q) -> Option<&str> where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized;
}
Expand description

Access to scalar values in an object

Required Associated Types§

Source

type Key: ?Sized

The type for Objects

Required Methods§

Source

fn get_bool<Q>(&self, k: &Q) -> Option<bool>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a bool

Source

fn get_i128<Q>(&self, k: &Q) -> Option<i128>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a i128

Source

fn get_i64<Q>(&self, k: &Q) -> Option<i64>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a i64

Source

fn get_i32<Q>(&self, k: &Q) -> Option<i32>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a i32

Source

fn get_i16<Q>(&self, k: &Q) -> Option<i16>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a i16

Source

fn get_i8<Q>(&self, k: &Q) -> Option<i8>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a i8

Source

fn get_u128<Q>(&self, k: &Q) -> Option<u128>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a u128

Source

fn get_u64<Q>(&self, k: &Q) -> Option<u64>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a u64

Source

fn get_usize<Q>(&self, k: &Q) -> Option<usize>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a usize

Source

fn get_u32<Q>(&self, k: &Q) -> Option<u32>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a u32

Source

fn get_u16<Q>(&self, k: &Q) -> Option<u16>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a u16

Source

fn get_u8<Q>(&self, k: &Q) -> Option<u8>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a u8

Source

fn get_f64<Q>(&self, k: &Q) -> Option<f64>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a f64

Source

fn get_f32<Q>(&self, k: &Q) -> Option<f32>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a f32

Source

fn get_str<Q>(&self, k: &Q) -> Option<&str>
where Self::Key: Borrow<Q>, Q: Hash + Eq + Ord + ?Sized,

Tries to get an element of an object as a str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tape, 'input> ValueObjectAccessAsScalar for Value<'tape, 'input>
where 'input: 'tape,

Source§

impl<T> ValueObjectAccessAsScalar for T