pub enum Value {
String(String),
Integer(i64),
Float(f64),
Boolean(bool),
Array(Row),
Dictionary(Dictionary),
}
Variants§
Implementations§
source§impl Value
impl Value
pub fn new_string(value: &str) -> Self
pub fn new_string_array(value: &str) -> Self
pub fn new_array(value: Value) -> Self
pub fn type_str(&self) -> &'static str
pub fn as_string(&self) -> Option<&String>
pub fn is_string(&self) -> bool
pub fn as_str(&self) -> Option<&str>
pub fn as_integer(&self) -> Option<i64>
pub fn as_float(&self) -> Option<f64>
pub fn as_boolean(&self) -> Option<bool>
pub fn as_array(&self) -> Option<&Vec<Value>>
pub fn as_dictionary(&self) -> Option<&Dictionary>
pub fn get(&self, name: &str) -> Option<&Value>
pub fn from_ion<F>(&self) -> Result<F, F::Err>
pub fn parse<F>(&self) -> Result<F, F::Err>where
F: FromStr,
Trait Implementations§
source§impl PartialEq for Value
impl PartialEq for Value
impl StructuralPartialEq for Value
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