pub enum Value {
Bool(bool),
Int(i64),
Float(f64),
String(String),
Array(Vec<Value>),
Struct(StructValue),
}
Expand description
Hold a value in the evaluation result of supported types.
Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_struct(&self) -> Option<&StructValue>
pub fn as_struct(&self) -> Option<&StructValue>
Try to convert self
to StructValue
.
Trait Implementations§
Source§impl From<StructValue> for Value
impl From<StructValue> for Value
Source§fn from(value: StructValue) -> Self
fn from(value: StructValue) -> Self
Converts to this type from the input type.
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