pub enum Input {
Bool(bool),
Int(isize),
Float(f64),
Str(String),
List(Vec<Input>),
Map(HashMap<String, Input>),
}Variants§
Implementations§
Source§impl Input
impl Input
pub fn new_map() -> Self
pub fn new_list() -> Self
pub fn new_str() -> Self
pub fn is_bool(&self) -> bool
pub fn as_bool(&self) -> Option<&bool>
pub fn into_bool(self) -> Option<bool>
pub fn bool_mut(&mut self) -> Option<&mut bool>
pub fn is_int(&self) -> bool
pub fn as_int(&self) -> Option<&isize>
pub fn into_int(self) -> Option<isize>
pub fn int_mut(&mut self) -> Option<&mut isize>
pub fn is_float(&self) -> bool
pub fn as_float(&self) -> Option<&f64>
pub fn into_float(self) -> Option<f64>
pub fn float_mut(&mut self) -> Option<&mut f64>
pub fn is_str(&self) -> bool
pub fn as_str(&self) -> Option<&String>
pub fn into_str(self) -> Option<String>
pub fn str_mut(&mut self) -> Option<&mut String>
pub fn is_list(&self) -> bool
pub fn as_list(&self) -> Option<&Vec<Input>>
pub fn into_list(self) -> Option<Vec<Input>>
pub fn list_mut(&mut self) -> Option<&mut Vec<Input>>
pub fn is_map(&self) -> bool
pub fn as_map(&self) -> Option<&HashMap<String, Input>>
pub fn into_map(self) -> Option<HashMap<String, Input>>
pub fn map_mut(&mut self) -> Option<&mut HashMap<String, Input>>
pub fn type_name(&self) -> String
pub fn map_type_name() -> String
pub fn list_type_name() -> String
pub fn str_type_name() -> String
pub fn int_type_name() -> String
pub fn float_type_name() -> String
pub fn bool_type_name() -> String
Trait Implementations§
Source§impl<I: Into<Input>> FromIterator<I> for Input
impl<I: Into<Input>> FromIterator<I> for Input
Source§fn from_iter<T: IntoIterator<Item = I>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = I>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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