Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Debug, Clone and PartialEq for ValueOpt #332

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edgedb-protocol/src/client_message.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
([Website reference](https://www.edgedb.com/docs/reference/protocol/messages)) The [ClientMessage](crate::client_message::ClientMessage) enum and related types.
([Website reference](https://www.edgedb.com/docs/reference/protocol/messages)) The [ClientMessage] enum and related types.

```rust,ignore
pub enum ClientMessage {
Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/codec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Implementations of the [Codec](crate::codec::Codec) trait into types found in the [Value](crate::value::Value) enum.
Implementations of the [Codec] trait into types found in the [Value] enum.
*/

use std::any::type_name;
Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/descriptors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
([Website reference](https://www.edgedb.com/docs/reference/protocol/typedesc)) Types for the [Descriptor](crate::descriptors::Descriptor) enum.
([Website reference](https://www.edgedb.com/docs/reference/protocol/typedesc)) Types for the [Descriptor] enum.

```rust,ignore
pub enum Descriptor {
Expand Down
4 changes: 2 additions & 2 deletions edgedb-protocol/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
([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)
EdgeDB types used for data modeling can be seen on the [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.
Expand All @@ -12,7 +12,7 @@ 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)
* [QueryResult]: single result from a query (scalars and tuples)

The Value enum:

Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/query_arg.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Contains the [QueryArg](crate::query_arg::QueryArg) and [QueryArgs](crate::query_arg::QueryArgs) traits.
Contains the [QueryArg] and [QueryArgs] traits.
*/

use std::convert::{TryFrom, TryInto};
Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/queryable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Contains the [Queryable](crate::queryable::Queryable) trait.
Contains the [Queryable] trait.
*/
use snafu::{ensure, Snafu};
use std::default::Default;
Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/server_message.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
The [ServerMessage](crate::server_message::ServerMessage) enum and related types. EdgeDB website documentation on messages [here](https://www.edgedb.com/docs/reference/protocol/messages).
The [ServerMessage] enum and related types. EdgeDB website documentation on messages [here](https://www.edgedb.com/docs/reference/protocol/messages).

```rust,ignore
pub enum ServerMessage {
Expand Down
2 changes: 1 addition & 1 deletion edgedb-protocol/src/value.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Contains the [Value](crate::value::Value) enum.
Contains the [Value] enum.
*/
use bytes::Bytes;

Expand Down
3 changes: 2 additions & 1 deletion edgedb-protocol/src/value_opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use crate::value::Value;
/// An optional [Value] that can be constructed from `impl Into<Value>`,
/// `Option<impl Into<Value>>`, `Vec<impl Into<Value>>` or
/// `Option<Vec<impl Into<Value>>>`.
/// Used by [eargs!] macro.
/// Used by [named_args!](`crate::named_args!`) macro.
#[derive(Clone, Debug, PartialEq)]
pub struct ValueOpt(Option<Value>);

impl<V: Into<Value>> From<V> for ValueOpt {
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
buildInputs = [
(fenix_pkgs.toolchainOf {
channel = "beta";
sha256 = "sha256-WtTNSmxfoiHJEwCUnuDNfRNBZjNrzdBV02Hikw+YE+s=";
sha256 = "sha256-q7N1YC9mppPme25wjb81cuOgDXFCkA10Lb1D1GCDv04=";
}).defaultToolchain
] ++ common;
};
Expand Down
Loading