pub enum Value {
Show 32 variants
None {
inner: ValueType,
},
Boolean(bool),
Float4(OrderedF32),
Float8(OrderedF64),
Int1(i8),
Int2(i16),
Int4(i32),
Int8(i64),
Int16(i128),
Utf8(String),
Uint1(u8),
Uint2(u16),
Uint4(u32),
Uint8(u64),
Uint16(u128),
Date(Date),
DateTime(DateTime),
Time(Time),
Duration(Duration),
IdentityId(IdentityId),
Uuid4(Uuid4),
Uuid7(Uuid7),
Blob(Blob),
Int(Int),
Uint(Uint),
Decimal(Decimal),
Any(Box<Value>),
DictionaryId(DictionaryEntryId),
Type(ValueType),
List(Vec<Value>),
Record(Vec<(String, Value)>),
Tuple(Vec<Value>),
}Variants§
None
Boolean(bool)
Float4(OrderedF32)
Float8(OrderedF64)
Int1(i8)
Int2(i16)
Int4(i32)
Int8(i64)
Int16(i128)
Utf8(String)
Uint1(u8)
Uint2(u16)
Uint4(u32)
Uint8(u64)
Uint16(u128)
Date(Date)
DateTime(DateTime)
Time(Time)
Duration(Duration)
IdentityId(IdentityId)
Uuid4(Uuid4)
Uuid7(Uuid7)
Blob(Blob)
Int(Int)
Uint(Uint)
Decimal(Decimal)
Any(Box<Value>)
DictionaryId(DictionaryEntryId)
Type(ValueType)
List(Vec<Value>)
Record(Vec<(String, Value)>)
Tuple(Vec<Value>)
Implementations§
Source§impl Value
impl Value
pub fn none() -> Self
pub fn none_of(ty: ValueType) -> Self
pub fn bool(v: impl Into<bool>) -> Self
pub fn float4(v: impl Into<f32>) -> Self
pub fn float8(v: impl Into<f64>) -> Self
pub fn int1(v: impl Into<i8>) -> Self
pub fn int2(v: impl Into<i16>) -> Self
pub fn int4(v: impl Into<i32>) -> Self
pub fn int8(v: impl Into<i64>) -> Self
pub fn int16(v: impl Into<i128>) -> Self
pub fn utf8(v: impl Into<String>) -> Self
pub fn uint1(v: impl Into<u8>) -> Self
pub fn uint2(v: impl Into<u16>) -> Self
pub fn uint4(v: impl Into<u32>) -> Self
pub fn uint8(v: impl Into<u64>) -> Self
pub fn uint16(v: impl Into<u128>) -> Self
pub fn date(v: impl Into<Date>) -> Self
pub fn datetime(v: impl Into<DateTime>) -> Self
pub fn time(v: impl Into<Time>) -> Self
pub fn duration(v: impl Into<Duration>) -> Self
pub fn duration_nanoseconds(nanoseconds: i64) -> Self
pub fn duration_microseconds(microseconds: i64) -> Self
pub fn duration_milliseconds(milliseconds: i64) -> Self
pub fn duration_seconds(seconds: i64) -> Self
pub fn duration_minutes(minutes: i64) -> Self
pub fn duration_hours(hours: i64) -> Self
pub fn identity_id(v: impl Into<IdentityId>) -> Self
pub fn uuid4(v: impl Into<Uuid4>) -> Self
pub fn uuid7(v: impl Into<Uuid7>) -> Self
pub fn blob(v: impl Into<Blob>) -> Self
pub fn any(v: impl Into<Value>) -> Self
pub fn list(items: Vec<Value>) -> Self
pub fn record(fields: Vec<(String, Value)>) -> Self
pub fn to_usize(&self) -> Option<usize>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Value
Source§impl Ord for Value
impl Ord for Value
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl SafeAdd for Value
impl SafeAdd for Value
fn checked_add(&self, r: &Self) -> Option<Self>
fn saturating_add(&self, r: &Self) -> Self
fn wrapping_add(&self, r: &Self) -> Self
Source§impl SafeDiv for Value
impl SafeDiv for Value
fn checked_div(&self, r: &Self) -> Option<Self>
fn saturating_div(&self, r: &Self) -> Self
fn wrapping_div(&self, r: &Self) -> Self
fn is_zero(&self) -> bool
Source§impl SafeMul for Value
impl SafeMul for Value
fn checked_mul(&self, r: &Self) -> Option<Self>
fn saturating_mul(&self, r: &Self) -> Self
fn wrapping_mul(&self, r: &Self) -> Self
Source§impl SafeRemainder for Value
impl SafeRemainder for Value
fn checked_rem(&self, r: &Self) -> Option<Self>
fn saturating_rem(&self, r: &Self) -> Self
fn wrapping_rem(&self, r: &Self) -> Self
fn is_zero(&self) -> bool
Source§impl SafeSub for Value
impl SafeSub for Value
fn checked_sub(&self, r: &Self) -> Option<Self>
fn saturating_sub(&self, r: &Self) -> Self
fn wrapping_sub(&self, r: &Self) -> Self
Source§impl TryFromValue for Value
impl TryFromValue for Value
fn try_from_value(value: &Value) -> Result<Self, FromValueError>
fn from_value(value: &Value) -> Option<Self>
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