pub struct Value<'p> { /* private fields */ }Expand description
Implementations§
Source§impl<'p> Value<'p>
impl<'p> Value<'p>
pub fn kind(&self) -> ValueKind<'p>
pub fn is_null(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn is_number(&self) -> bool
pub fn as_number(&self) -> Option<f64>
pub fn is_string(&self) -> bool
pub fn to_string(&self) -> Option<String>
pub fn is_array(&self) -> bool
pub fn to_array(&self) -> Option<Vec<Self>>
pub fn is_object(&self) -> bool
pub fn to_object(&self) -> Option<Vec<(InternedStr<'p>, Self)>>
pub fn is_function(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'p> Freeze for Value<'p>
impl<'p> !RefUnwindSafe for Value<'p>
impl<'p> !Send for Value<'p>
impl<'p> !Sync for Value<'p>
impl<'p> Unpin for Value<'p>
impl<'p> !UnwindSafe for Value<'p>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more