Skip to main content

EdgedbSetValue

Trait EdgedbSetValue 

Source
pub trait EdgedbSetValue: Sized {
    const EXPECTED_CARDINALITY: Cardinality;

    // Required methods
    fn from_edgedb_set_value(value: Value) -> Result<Self>;
    fn interpret_possibly_missing_required_value(
        val: Option<Self>,
    ) -> Result<Self>;
    fn query_direct<Args: EdgedbQueryArgs + Send>(
        client: &Client,
        q: &str,
        args: Args,
    ) -> impl Future<Output = Result<Self>> + Send;
}
Expand description

A value of a particular cardinality (typically it’s provided automatically for T, Option<T>, Vec<T> or NonEmpty<T>)

Required Associated Constants§

Required Methods§

Source

fn from_edgedb_set_value(value: Value) -> Result<Self>

Source

fn interpret_possibly_missing_required_value(val: Option<Self>) -> Result<Self>

Source

fn query_direct<Args: EdgedbQueryArgs + Send>( client: &Client, q: &str, args: Args, ) -> impl Future<Output = Result<Self>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: EdgedbValue> EdgedbSetValue for NonEmpty<T>

Source§

const EXPECTED_CARDINALITY: Cardinality = edgedb_protocol::server_message::Cardinality::AtLeastOne

Source§

fn from_edgedb_set_value(value: Value) -> Result<Self>

Source§

async fn query_direct<Args: EdgedbQueryArgs + Send>( client: &Client, q: &str, args: Args, ) -> Result<Self>

Source§

fn interpret_possibly_missing_required_value(val: Option<Self>) -> Result<Self>

Source§

impl<T: EdgedbValue> EdgedbSetValue for Option<T>

Source§

const EXPECTED_CARDINALITY: Cardinality = edgedb_protocol::server_message::Cardinality::AtMostOne

Source§

async fn query_direct<Args: EdgedbQueryArgs + Send>( client: &Client, q: &str, args: Args, ) -> Result<Self>

Source§

fn from_edgedb_set_value(value: Value) -> Result<Self>

Source§

fn interpret_possibly_missing_required_value(val: Option<Self>) -> Result<Self>

Source§

impl<T: EdgedbValue> EdgedbSetValue for Vec<T>

Source§

const EXPECTED_CARDINALITY: Cardinality = edgedb_protocol::server_message::Cardinality::Many

Source§

fn from_edgedb_set_value(value: Value) -> Result<Self>

Source§

async fn query_direct<Args: EdgedbQueryArgs + Send>( client: &Client, q: &str, args: Args, ) -> Result<Self>

Source§

fn interpret_possibly_missing_required_value(val: Option<Self>) -> Result<Self>

Implementors§

Source§

impl<T: EdgedbValue> EdgedbSetValue for T

Source§

const EXPECTED_CARDINALITY: Cardinality = edgedb_protocol::server_message::Cardinality::One