pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str(String),
Array(Vec<Value>),
Object(Vec<(String, Value)>),
}Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn order(&self, other: &Value) -> Ordering
pub fn order(&self, other: &Value) -> Ordering
Total order across types (jq’s ordering: null < bool < number < string < array < object).
Sourcepub fn value_eq(&self, other: &Value) -> bool
pub fn value_eq(&self, other: &Value) -> bool
Structural equality consistent with Value::order.
Sourcepub fn to_raw_string(&self) -> String
pub fn to_raw_string(&self) -> String
Render as a raw scalar for query output (no surrounding quotes on strings). Composite values are rendered as JSON.
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 UnsafeUnpin 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