value_trait::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: ?Sized + Hash + Eq + Ord; fn get_i128<Q>(&self, k: &Q) -> Option<i128> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_i64<Q>(&self, k: &Q) -> Option<i64> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_i32<Q>(&self, k: &Q) -> Option<i32> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_i16<Q>(&self, k: &Q) -> Option<i16> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_i8<Q>(&self, k: &Q) -> Option<i8> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_u128<Q>(&self, k: &Q) -> Option<u128> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_u64<Q>(&self, k: &Q) -> Option<u64> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_usize<Q>(&self, k: &Q) -> Option<usize> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_u32<Q>(&self, k: &Q) -> Option<u32> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_u16<Q>(&self, k: &Q) -> Option<u16> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_u8<Q>(&self, k: &Q) -> Option<u8> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_f64<Q>(&self, k: &Q) -> Option<f64> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_f32<Q>(&self, k: &Q) -> Option<f32> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord; fn get_str<Q>(&self, k: &Q) -> Option<&str> where Self::Key: Borrow<Q>, Q: ?Sized + Hash + Eq + Ord;
}
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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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: ?Sized + Hash + Eq + Ord,

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§