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) -> &bool
pub fn into_bool(self) -> bool
pub fn bool_mut(&mut self) -> &mut bool
pub fn is_int(&self) -> bool
pub fn as_int(&self) -> &isize
pub fn into_int(self) -> isize
pub fn int_mut(&mut self) -> &mut isize
pub fn is_float(&self) -> bool
pub fn as_float(&self) -> &f64
pub fn into_float(self) -> f64
pub fn float_mut(&mut self) -> &mut f64
pub fn is_str(&self) -> bool
pub fn as_str(&self) -> &String
pub fn into_str(self) -> String
pub fn str_mut(&mut self) -> &mut String
pub fn is_list(&self) -> bool
pub fn as_list(&self) -> &Vec<Input>
pub fn into_list(self) -> Vec<Input>
pub fn list_mut(&mut self) -> &mut Vec<Input>
pub fn is_map(&self) -> bool
pub fn as_map(&self) -> &HashMap<String, Input>
pub fn into_map(self) -> HashMap<String, Input>
pub fn map_mut(&mut self) -> &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<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 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