pub enum Value {
Str(String),
Bool(bool),
Int(i32),
Null,
}Expand description
Encapsulates the returned parsed argument
Variants§
Implementations§
Source§impl Value
impl Value
pub fn is_null(&self) -> bool
pub fn unwrap_str<'a>(&'a self) -> &'a String
pub fn unwrap_str_or<'a>(&'a self, other: &'a String) -> &'a String
pub fn unwrap_bool<'a>(&'a self) -> &'a bool
pub fn unwrap_bool_or<'a>(&'a self, other: &'a bool) -> &'a bool
pub fn unwrap_int(&self) -> &i32
pub fn unwrap_int_or<'a>(&'a self, other: &'a i32) -> &'a i32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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