1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*!
([Website reference](https://www.edgedb.com/docs/reference/protocol/index)) The EdgeDB protocol for Edgedb-Rust.

EdgeDB types used for data modeling can be seen on the [model](crate::model) crate, in which the [Value](crate::value::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](crate::model::Duration)
appear to be standard library types but are unique to the EdgeDB protocol.

Other parts of this crate pertain to the rest of the EdgeDB protocol (e.g. client + server message formats), plus various traits
for working with the client such as:

* [QueryArg](crate::query_arg::QueryArg): a single argument for a query
* [QueryArgs](crate::query_arg::QueryArgs): a tuple of query arguments
* [Queryable](crate::queryable::Queryable): for the Queryable derive macro
* [QueryResult](crate::query_result::QueryResult): single result from a query (scalars and tuples)

The Value enum:

```rust,ignore
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>>),
}
```
*/

mod query_result; // sealed trait should remain non-public

pub mod client_message;
pub mod codec;
pub mod common;
pub mod descriptors;
pub mod encoding;
pub mod error_response;
pub mod errors;
pub mod features;
pub mod queryable;
pub mod serialization;
pub mod server_message;
pub mod value;
#[macro_use]
pub mod value_opt;
pub mod model;
pub mod query_arg;

pub use query_result::QueryResult;