pub enum Value {
Boolean(bool),
Number(f64),
String(String),
Node(Node),
}
Variants§
Implementations§
Source§impl Value
impl Value
pub fn is_something(&self) -> bool
pub fn as_node(&self) -> Result<&Node, Error>
pub fn is_node(&self) -> bool
pub fn into_node(self) -> Result<Node, Error>
pub fn boolean(&self) -> Result<bool, Error>
pub fn number(&self) -> Result<f64, Error>
pub fn as_string(&self) -> Result<&String, Error>
pub fn string(self) -> Result<String, Error>
Sourcepub fn convert_to_string(self) -> Result<String, Error>
pub fn convert_to_string(self) -> Result<String, Error>
Change non-string Value
to a String
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