Expand description
(Website reference) The Gel protocol for Gel-Rust.
Gel types used for data modeling can be seen on the model crate, in which the Value enum provides the quickest overview of all the possible types encountered using the client. Many of the variants hold Rust standard library types while others contain types defined in this protocol. Some types such as Duration appear to be standard library types but are unique to the Gel protocol.
Other parts of this crate pertain to the rest of the Gel protocol (e.g. client + server message formats), plus various traits for working with the client such as:
- QueryArg: a single argument for a query
- QueryArgs: a tuple of query arguments
- Queryable: for the Queryable derive macro
- QueryResult: single result from a query (scalars and tuples)
The Value enum:
ⓘ
pub enum Value {
Nothing,
Uuid(Uuid),
Str(String),
Bytes(Bytes),
Int16(i16),
Int32(i32),
Int64(i64),
Float32(f32),
Float64(f64),
BigInt(BigInt),
ConfigMemory(ConfigMemory),
Decimal(Decimal),
Bool(bool),
Datetime(Datetime),
LocalDatetime(LocalDatetime),
LocalDate(LocalDate),
LocalTime(LocalTime),
Duration(Duration),
RelativeDuration(RelativeDuration),
DateDuration(DateDuration),
Json(Json),
Set(Vec<Value>),
Object {
shape: ObjectShape,
fields: Vec<Option<Value>>,
},
SparseObject(SparseObject),
Tuple(Vec<Value>),
NamedTuple {
shape: NamedTupleShape,
fields: Vec<Value>,
},
Array(Vec<Value>),
Enum(EnumValue),
Range(Range<Box<Value>>),
}Modules§
- annotations
- client_
message - (Website reference) The ClientMessage enum and related types.
- codec
- Implementations of the Codec trait into types found in the Value enum.
- common
- (Website reference) Capabilities, CompilationFlags etc. from the message protocol.
- descriptors
- (Website reference) Types for the Descriptor enum.
- encoding
- error_
response - errors
- features
- model
- Gel Types Used for Data Modelling
- query_
arg - Contains the QueryArg and QueryArgs traits.
- queryable
- Contains the Queryable trait.
- serialization
- server_
message - The ServerMessage enum and related types. Gel website documentation on messages here.
- value
- Contains the Value enum.
- value_
opt
Macros§
- named_
args - Constructs named query arguments that implement QueryArgs so they can be passed into any query method.
Traits§
- Query
Result - A trait representing single result from a query.