gel_protocol/lib.rs
1/*!
2([Website reference](https://www.edgedb.com/docs/reference/protocol/index)) The Gel protocol for Gel-Rust.
3
4Gel types used for data modeling can be seen on the [model] crate, in which the [Value](crate::value::Value)
5enum provides the quickest overview of all the possible types encountered using the client. Many of the variants hold Rust
6standard library types while others contain types defined in this protocol. Some types such as [Duration](crate::model::Duration)
7appear to be standard library types but are unique to the Gel protocol.
8
9Other parts of this crate pertain to the rest of the Gel protocol (e.g. client + server message formats), plus various traits
10for working with the client such as:
11
12* [QueryArg](crate::query_arg::QueryArg): a single argument for a query
13* [QueryArgs](crate::query_arg::QueryArgs): a tuple of query arguments
14* [Queryable](crate::queryable::Queryable): for the Queryable derive macro
15* [QueryResult]: single result from a query (scalars and tuples)
16
17The Value enum:
18
19```rust,ignore
20pub enum Value {
21 Nothing,
22 Uuid(Uuid),
23 Str(String),
24 Bytes(Bytes),
25 Int16(i16),
26 Int32(i32),
27 Int64(i64),
28 Float32(f32),
29 Float64(f64),
30 BigInt(BigInt),
31 ConfigMemory(ConfigMemory),
32 Decimal(Decimal),
33 Bool(bool),
34 Datetime(Datetime),
35 LocalDatetime(LocalDatetime),
36 LocalDate(LocalDate),
37 LocalTime(LocalTime),
38 Duration(Duration),
39 RelativeDuration(RelativeDuration),
40 DateDuration(DateDuration),
41 Json(Json),
42 Set(Vec<Value>),
43 Object {
44 shape: ObjectShape,
45 fields: Vec<Option<Value>>,
46 },
47 SparseObject(SparseObject),
48 Tuple(Vec<Value>),
49 NamedTuple {
50 shape: NamedTupleShape,
51 fields: Vec<Value>,
52 },
53 Array(Vec<Value>),
54 Enum(EnumValue),
55 Range(Range<Box<Value>>),
56}
57```
58*/
59
60mod query_result; // sealed trait should remain non-public
61
62pub mod client_message;
63pub mod codec;
64pub mod common;
65pub mod descriptors;
66pub mod encoding;
67pub mod error_response;
68pub mod errors;
69pub mod features;
70pub mod queryable;
71pub mod serialization;
72pub mod server_message;
73pub mod value;
74#[macro_use]
75pub mod value_opt;
76pub mod annotations;
77pub mod model;
78pub mod query_arg;
79
80pub use query_result::QueryResult;
81
82#[doc(hidden)]
83use gel_db_protocol::protocol as new_protocol;