pub enum CqlValue {
Show 26 variants Ascii(String), Boolean(bool), Blob(Vec<u8, Global>), Counter(Counter), Decimal(BigDecimal), Date(u32), Double(f64), Duration(CqlDuration), Empty, Float(f32), Int(i32), BigInt(i64), Text(String), Timestamp(Duration), Inet(IpAddr), List(Vec<CqlValue, Global>), Map(Vec<(CqlValue, CqlValue), Global>), Set(Vec<CqlValue, Global>), UserDefinedType { keyspace: String, type_name: String, fields: Vec<(String, Option<CqlValue>), Global>, }, SmallInt(i16), TinyInt(i8), Time(Duration), Timeuuid(Uuid), Tuple(Vec<Option<CqlValue>, Global>), Uuid(Uuid), Varint(BigInt),
}

Variants

Ascii(String)

Boolean(bool)

Blob(Vec<u8, Global>)

Counter(Counter)

Decimal(BigDecimal)

Date(u32)

Days since -5877641-06-23 i.e. 2^31 days before unix epoch Can be converted to chrono::NaiveDate (-262145-1-1 to 262143-12-31) using as_date

Double(f64)

Duration(CqlDuration)

Empty

Float(f32)

Int(i32)

BigInt(i64)

Text(String)

Timestamp(Duration)

Milliseconds since unix epoch

Inet(IpAddr)

List(Vec<CqlValue, Global>)

Map(Vec<(CqlValue, CqlValue), Global>)

Set(Vec<CqlValue, Global>)

UserDefinedType

Fields

keyspace: String
type_name: String
fields: Vec<(String, Option<CqlValue>), Global>

Order of fields vector must match the order of fields as defined in the UDT. The driver does not check it by itself, so incorrect data will be written if the order is wrong.

SmallInt(i16)

TinyInt(i8)

Time(Duration)

Nanoseconds since midnight

Timeuuid(Uuid)

Tuple(Vec<Option<CqlValue>, Global>)

Uuid(Uuid)

Varint(BigInt)

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more