pub enum Value {
Show 28 variants
Undefined,
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),
RowNumber(RowNumber),
IdentityId(IdentityId),
Uuid4(Uuid4),
Uuid7(Uuid7),
Blob(Blob),
Int(Int),
Uint(Uint),
Decimal(Decimal),
Any(Box<Value>),
}Expand description
A RQL value, represented as a native Rust type.
Variants§
Undefined
Value is not defined (think null in common programming languages)
Boolean(bool)
A boolean: true or false.
Float4(OrderedF32)
A 4-byte floating point
Float8(OrderedF64)
An 8-byte floating point
Int1(i8)
A 1-byte signed integer
Int2(i16)
A 2-byte signed integer
Int4(i32)
A 4-byte signed integer
Int8(i64)
An 8-byte signed integer
Int16(i128)
A 16-byte signed integer
Utf8(String)
A UTF-8 encoded text. Maximum 255 bytes
Uint1(u8)
A 1-byte unsigned integer
Uint2(u16)
A 2-byte unsigned integer
Uint4(u32)
A 4-byte unsigned integer
Uint8(u64)
A 8-byte unsigned integer
Uint16(u128)
A 16-byte unsigned integer
Date(Date)
A date value (year, month, day)
DateTime(DateTime)
A date and time value with nanosecond precision in SVTC
Time(Time)
A time value (hour, minute, second, nanosecond)
Duration(Duration)
A duration representing a duration
RowNumber(RowNumber)
A encoded number (8-byte unsigned integer)
IdentityId(IdentityId)
An identity identifier (UUID v7)
Uuid4(Uuid4)
A UUID version 4 (random)
Uuid7(Uuid7)
A UUID version 7 (timestamp-based)
Blob(Blob)
A binary large object (BLOB)
Int(Int)
An arbitrary-precision signed integer
Uint(Uint)
An arbitrary-precision unsigned integer
Decimal(Decimal)
An arbitrary-precision decimal
Any(Box<Value>)
A container that can hold any value type
Implementations§
Source§impl Value
impl Value
pub fn undefined() -> 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 row_number(v: impl Into<RowNumber>) -> 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
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>,
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl TryFromValue for Value
impl TryFromValue for Value
Source§fn try_from_value(value: &Value) -> Result<Self, FromValueError>
fn try_from_value(value: &Value) -> Result<Self, FromValueError>
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)