pub enum Value {
Show 23 variants
Bool(bool),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
SparseRecord(SparseRecord),
Null,
Record(ValueRecord),
List(Vec<Value>),
String(String),
Bytes(Vec<u8>),
Uuid(Uuid),
Decimal(Decimal),
BigDecimal(BigDecimal),
Timestamp(Timestamp),
Zoned(Zoned),
Date(Date),
Time(Time),
DateTime(DateTime),
}Variants§
Bool(bool)
Boolean value
I8(i8)
Signed 8-bit integer
I16(i16)
Signed 16-bit integer
I32(i32)
Signed 32-bit integer
I64(i64)
Signed 64-bit integer
U8(u8)
Unsigned 8-bit integer
U16(u16)
Unsigned 16-bit integer
U32(u32)
Unsigned 32-bit integer
U64(u64)
Unsigned 64-bit integer
SparseRecord(SparseRecord)
A typed record
Null
Null value
Record(ValueRecord)
Record value, either borrowed or owned
List(Vec<Value>)
A list of values of the same type
String(String)
String value, either borrowed or owned
Bytes(Vec<u8>)
An array of bytes that is more efficient than List(u8)
Uuid(Uuid)
128-bit universally unique identifier (UUID)
Decimal(Decimal)
A fixed-precision decimal number.
See [rust_decimal::Decimal].
BigDecimal(BigDecimal)
An arbitrary-precision decimal number.
See [bigdecimal::BigDecimal].
Timestamp(Timestamp)
An instant in time represented as the number of nanoseconds since the Unix epoch.
See [jiff::Timestamp].
Zoned(Zoned)
A time zone aware instant in time.
See [jiff::Zoned]
Date(Date)
A representation of a civil date in the Gregorian calendar.
See [jiff::civil::Date].
Time(Time)
A representation of civil “wall clock” time.
See [jiff::civil::Time].
DateTime(DateTime)
A representation of a civil datetime in the Gregorian calendar.
See [jiff::civil::DateTime].
Implementations§
Source§impl Value
impl Value
pub fn to_i8(&self) -> Option<i8>
pub fn to_i8_unwrap(&self) -> i8
pub fn to_i16(&self) -> Option<i16>
pub fn to_i16_unwrap(&self) -> i16
pub fn to_i32(&self) -> Option<i32>
pub fn to_i32_unwrap(&self) -> i32
pub fn to_i64(&self) -> Option<i64>
pub fn to_i64_unwrap(&self) -> i64
pub fn to_u8(&self) -> Option<u8>
pub fn to_u8_unwrap(&self) -> u8
pub fn to_u16(&self) -> Option<u16>
pub fn to_u16_unwrap(&self) -> u16
pub fn to_u32(&self) -> Option<u32>
pub fn to_u32_unwrap(&self) -> u32
pub fn to_u64(&self) -> Option<u64>
pub fn to_u64_unwrap(&self) -> u64
Source§impl Value
impl Value
pub fn empty_sparse_record() -> Self
pub fn sparse_record(fields: PathFieldSet, record: ValueRecord) -> Self
pub fn into_sparse_record(self) -> SparseRecord
Source§impl Value
impl Value
pub const fn is_null(&self) -> bool
pub const fn is_record(&self) -> bool
pub fn record_from_vec(fields: Vec<Self>) -> Self
Sourcepub const fn from_bool(src: bool) -> Self
pub const fn from_bool(src: bool) -> Self
Create a ValueCow representing the given boolean value
pub fn as_str(&self) -> Option<&str>
pub fn expect_string(&self) -> &str
pub fn as_record(&self) -> Option<&ValueRecord>
pub fn expect_record(&self) -> &ValueRecord
pub fn expect_record_mut(&mut self) -> &mut ValueRecord
pub fn into_record(self) -> ValueRecord
pub fn is_a(&self, ty: &Type) -> bool
pub fn entry(&self, path: impl EntryPath) -> Entry<'_>
pub fn take(&mut self) -> Self
Trait Implementations§
Source§impl From<SparseRecord> for Value
impl From<SparseRecord> for Value
Source§fn from(value: SparseRecord) -> Self
fn from(value: SparseRecord) -> Self
Source§impl From<Value> for ValueStream
impl From<Value> for ValueStream
Source§impl From<ValueRecord> for Value
impl From<ValueRecord> for Value
Source§fn from(value: ValueRecord) -> Self
fn from(value: ValueRecord) -> Self
Source§impl<T1, T2, T3> Like<(T1, T2, T3)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3>,
impl<T1, T2, T3> Like<(T1, T2, T3)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3>,
Source§impl<T1, T2, T3, T4> Like<(T1, T2, T3, T4)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4>,
impl<T1, T2, T3, T4> Like<(T1, T2, T3, T4)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4>,
Source§impl<T1, T2, T3, T4, T5> Like<(T1, T2, T3, T4, T5)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5>,
impl<T1, T2, T3, T4, T5> Like<(T1, T2, T3, T4, T5)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5>,
Source§impl<T1, T2, T3, T4, T5, T6> Like<(T1, T2, T3, T4, T5, T6)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6>,
impl<T1, T2, T3, T4, T5, T6> Like<(T1, T2, T3, T4, T5, T6)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6>,
Source§impl<T1, T2, T3, T4, T5, T6, T7> Like<(T1, T2, T3, T4, T5, T6, T7)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7>,
impl<T1, T2, T3, T4, T5, T6, T7> Like<(T1, T2, T3, T4, T5, T6, T7)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7>,
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8> Like<(T1, T2, T3, T4, T5, T6, T7, T8)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8>,
impl<T1, T2, T3, T4, T5, T6, T7, T8> Like<(T1, T2, T3, T4, T5, T6, T7, T8)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8>,
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9>,
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10>,
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10> + Like<T11>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10> + Like<T11>,
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10> + Like<T11> + Like<T12>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Like<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Valuewhere
Value: Like<T1> + Like<T2> + Like<T3> + Like<T4> + Like<T5> + Like<T6> + Like<T7> + Like<T8> + Like<T9> + Like<T10> + Like<T11> + Like<T12>,
Source§impl<T0, T1, T2> PartialEq<(T0, T1, T2)> for Value
impl<T0, T1, T2> PartialEq<(T0, T1, T2)> for Value
Source§impl<T0, T1, T2, T3> PartialEq<(T0, T1, T2, T3)> for Value
impl<T0, T1, T2, T3> PartialEq<(T0, T1, T2, T3)> for Value
Source§impl<T0, T1, T2, T3, T4> PartialEq<(T0, T1, T2, T3, T4)> for Value
impl<T0, T1, T2, T3, T4> PartialEq<(T0, T1, T2, T3, T4)> for Value
Source§impl<T0, T1, T2, T3, T4, T5> PartialEq<(T0, T1, T2, T3, T4, T5)> for Value
impl<T0, T1, T2, T3, T4, T5> PartialEq<(T0, T1, T2, T3, T4, T5)> for Value
Source§impl<T0, T1, T2, T3, T4, T5, T6> PartialEq<(T0, T1, T2, T3, T4, T5, T6)> for Value
impl<T0, T1, T2, T3, T4, T5, T6> PartialEq<(T0, T1, T2, T3, T4, T5, T6)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7)> for Value
impl<T0, T1, T2, T3, T4, T5, T6, T7> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Value
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Value
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Value
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Value
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> PartialEq<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Value
Source§fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> bool
fn eq(&self, other: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> bool
self and other values to be equal, and is used by ==.Source§impl<T0, T1, T2> PartialEq<Value> for (T0, T1, T2)
impl<T0, T1, T2> PartialEq<Value> for (T0, T1, T2)
Source§impl<T0, T1, T2, T3> PartialEq<Value> for (T0, T1, T2, T3)
impl<T0, T1, T2, T3> PartialEq<Value> for (T0, T1, T2, T3)
Source§impl<T0, T1, T2, T3, T4> PartialEq<Value> for (T0, T1, T2, T3, T4)
impl<T0, T1, T2, T3, T4> PartialEq<Value> for (T0, T1, T2, T3, T4)
Source§impl<T0, T1, T2, T3, T4, T5> PartialEq<Value> for (T0, T1, T2, T3, T4, T5)
impl<T0, T1, T2, T3, T4, T5> PartialEq<Value> for (T0, T1, T2, T3, T4, T5)
Source§impl<T0, T1, T2, T3, T4, T5, T6> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6)
impl<T0, T1, T2, T3, T4, T5, T6> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6)
Source§impl<T0, T1, T2, T3, T4, T5, T6, T7> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<T0, T1, T2, T3, T4, T5, T6, T7> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7)
Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> PartialEq<Value> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Compares two values if they are of the same type.
Returns None for:
nullvalues (SQL semantics, e.g.,nullcomparisons are undefined)- Comparisons across different types
- Types without natural ordering (records, lists, etc.)
impl Eq for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.