pub enum Scalar {
Null,
Bool(bool),
Int(i64),
Float(f64),
String(String),
}Expand description
A fully resolved scalar value.
Note: Scalar intentionally does not implement Eq because f64 has
NaN != NaN semantics. Use .is_nan() for NaN comparisons and
(a - b).abs() < eps for finite float comparisons.
Variants§
Null
A null value.
Bool(bool)
A boolean value.
Int(i64)
An integer value.
Float(f64)
A floating-point value (including ±infinity and NaN).
String(String)
A string value.
Trait Implementations§
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnsafeUnpin for Scalar
impl UnwindSafe for Scalar
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