pub enum Value {
Show 17 variants
Bool(bool),
Integer(i64),
Decimal(Decimal),
Text(String),
Enum(String),
Timestamp(Timestamp),
Duration(DurationMs),
Maybe(Option<Box<Value>>),
List(Vec<Value>),
Record(BTreeMap<String, Value>),
Filtered(Filtered),
Shortlist(Shortlist),
Ranking(Ranking),
Null,
Absent(Absence),
Map(BTreeMap<String, Value>),
Joined(Vec<JoinEntry>),
}Expand description
An exact value.
Variants§
Bool(bool)
Integer(i64)
Decimal(Decimal)
Text(String)
Enum(String)
Timestamp(Timestamp)
Duration(DurationMs)
Maybe(Option<Box<Value>>)
List(Vec<Value>)
Record(BTreeMap<String, Value>)
Filtered(Filtered)
Shortlist(Shortlist)
Ranking(Ranking)
Null
A null nullable field (spec 032, 3.4.1).
Absent(Absence)
A value that failed its presence predicate, or a merged field that
could not be filled (spec 032, 3.4.3 and 3.6.2). Reading it is
missing_evidence; it is never a present value with empty fields.
Map(BTreeMap<String, Value>)
Joined(Vec<JoinEntry>)
Implementations§
Source§impl Value
impl Value
pub fn from_literal(l: &Literal) -> Value
pub fn literal_ty(l: &Literal) -> Ty
Sourcepub fn to_json(&self) -> Json
pub fn to_json(&self) -> Json
The JSON used in projections and conflict comparison. Decimals are strings and there are no fractional numbers, so it has canonical bytes.
Trait Implementations§
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 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