pub struct Value<'a> { /* private fields */ }
Expand description
Value is the JSON value returned from the get
function.
Implementations
sourceimpl<'a> Value<'a>
impl<'a> Value<'a>
pub fn get(&'a self, path: &'a str) -> Value<'a>
pub fn exists(&self) -> bool
pub fn kind(&self) -> Kind
pub fn json(&self) -> &str
pub fn f64(&'a self) -> f64
pub fn f32(&'a self) -> f32
pub fn i64(&'a self) -> i64
pub fn u64(&'a self) -> u64
pub fn i32(&'a self) -> i32
pub fn i16(&'a self) -> i16
pub fn i8(&'a self) -> i8
pub fn u32(&'a self) -> u32
pub fn u16(&'a self) -> u16
pub fn u8(&'a self) -> u8
pub fn bool(&'a self) -> bool
pub fn str(&'a self) -> &'a str
pub fn each(&'a self, iter: impl FnMut(Value<'a>, Value<'a>) -> bool)
pub fn array(&'a self) -> Vec<Value<'a>>
Trait Implementations
sourceimpl<'a> Ord for Value<'a>
impl<'a> Ord for Value<'a>
sourceimpl<'a> PartialOrd<Value<'a>> for Value<'a>
impl<'a> PartialOrd<Value<'a>> for Value<'a>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> Eq for Value<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more