pub enum Type {
Show 31 variants
Boolean,
Float4,
Float8,
Int1,
Int2,
Int4,
Int8,
Int16,
Utf8,
Uint1,
Uint2,
Uint4,
Uint8,
Uint16,
Date,
DateTime,
Time,
Duration,
IdentityId,
Uuid4,
Uuid7,
Blob,
Int,
Uint,
Decimal,
Option(Box<Type>),
Any,
DictionaryId,
List(Box<Type>),
Record(Vec<(String, Type)>),
Tuple(Vec<Type>),
}Expand description
All possible RQL data types
Variants§
Boolean
A boolean: true or false.
Float4
A 4-byte floating point
Float8
An 8-byte floating point
Int1
A 1-byte signed integer
Int2
A 2-byte signed integer
Int4
A 4-byte signed integer
Int8
An 8-byte signed integer
Int16
A 16-byte signed integer
Utf8
A UTF-8 encoded text.
Uint1
A 1-byte unsigned integer
Uint2
A 2-byte unsigned integer
Uint4
A 4-byte unsigned integer
Uint8
A 8-byte unsigned integer
Uint16
A 16-byte unsigned integer
Date
A date value (year, month, day)
DateTime
A date and time value with nanosecond precision in SVTC
Time
A time value (hour, minute, second, nanosecond)
Duration
A duration representing a duration
IdentityId
An identity identifier (UUID v7)
Uuid4
A UUID version 4 (random)
Uuid7
A UUID version 7 (timestamp-based)
Blob
A binary large object (BLOB)
Int
An arbitrary-precision signed integer
Uint
An arbitrary-precision unsigned integer
Decimal
An arbitrary-precision decimal with precision and scale
Option(Box<Type>)
An optional type that can hold None or a value of the inner type
Any
A container that can hold any value type
DictionaryId
A dictionary entry identifier
List(Box<Type>)
An ordered list of values of a given element type
Record(Vec<(String, Type)>)
A record type with named fields
Tuple(Vec<Type>)
A tuple of heterogeneous types
Implementations§
Source§impl Type
impl Type
pub fn list_of(ty: Type) -> Type
pub fn is_number(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_signed_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_floating_point(&self) -> bool
pub fn is_utf8(&self) -> bool
pub fn is_temporal(&self) -> bool
pub fn is_uuid(&self) -> bool
pub fn is_blob(&self) -> bool
pub fn is_option(&self) -> bool
Sourcepub fn inner_type(&self) -> &Type
pub fn inner_type(&self) -> &Type
Returns the inner type if this is an Option type, otherwise returns self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Type, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Type, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Type
impl Ord for Type
Source§impl PartialOrd for Type
impl PartialOrd for Type
Source§impl Serialize for Type
impl Serialize for Type
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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,
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
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>
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>
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