pub enum Value {
Show 32 variants
None {
inner: Type,
},
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(Type),
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(Type)
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: Type) -> 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 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
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 TryFromValue for Value
impl TryFromValue for Value
fn try_from_value(value: &Value) -> Result<Self, FromValueError>
fn from_value(value: &Value) -> Option<Self>
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more