pub enum CqlValue {
Show 27 variants
Ascii(String),
Boolean(bool),
BigInt(i64),
Blob(Vec<u8>),
Counter(i64),
Decimal(BigDecimal),
Double(f64),
Duration {
months: i32,
days: i32,
nanoseconds: i64,
},
Float(f32),
Int(i32),
SmallInt(i16),
TinyInt(i8),
Timestamp(i64),
Uuid(Uuid),
TimeUuid(Uuid),
Inet(IpAddr),
Date(NaiveDate),
Time(NaiveTime),
Text(String),
Varint(BigInt),
List(Vec<CqlValue>),
Set(Vec<CqlValue>),
Map(Vec<(CqlValue, CqlValue)>),
Tuple(Vec<Option<CqlValue>>),
UserDefinedType {
keyspace: String,
type_name: String,
fields: Vec<(String, Option<CqlValue>)>,
},
Null,
Unset,
}Expand description
A single CQL value, mirroring all CQL data types.
Variants§
Ascii(String)
ASCII string.
Boolean(bool)
Boolean value.
BigInt(i64)
Arbitrary-precision integer.
Blob(Vec<u8>)
Arbitrary blob of bytes.
Counter(i64)
Counter value.
Decimal(BigDecimal)
Arbitrary-precision decimal.
Double(f64)
Double-precision floating point.
Duration
Duration (months, days, nanoseconds).
Float(f32)
Single-precision floating point.
Int(i32)
32-bit integer.
SmallInt(i16)
16-bit integer (smallint).
TinyInt(i8)
8-bit integer (tinyint).
Timestamp(i64)
Timestamp (milliseconds since Unix epoch).
Uuid(Uuid)
UUID.
TimeUuid(Uuid)
TimeUUID (v1).
Inet(IpAddr)
IP address (inet).
Date(NaiveDate)
Date (days since epoch: 2^31).
Time(NaiveTime)
Time of day (nanoseconds since midnight).
Text(String)
UTF-8 string.
Varint(BigInt)
Arbitrary-precision integer.
List(Vec<CqlValue>)
Ordered list of values.
Set(Vec<CqlValue>)
Set of values.
Map(Vec<(CqlValue, CqlValue)>)
Map of key-value pairs.
Tuple(Vec<Option<CqlValue>>)
Tuple of values.
UserDefinedType
User-defined type.
Null
Null/empty value.
Unset
Unset value (for prepared statement bindings).
Trait Implementations§
impl StructuralPartialEq for CqlValue
Auto Trait Implementations§
impl Freeze for CqlValue
impl RefUnwindSafe for CqlValue
impl Send for CqlValue
impl Sync for CqlValue
impl Unpin for CqlValue
impl UnwindSafe for CqlValue
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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