QueryConn

Trait QueryConn 

Source
pub trait QueryConn {
    type Error;

    // Required method
    fn query<'life0, 'async_trait, Q>(
        &'life0 self,
        variables: Q::Variables,
    ) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>
       where Q: GraphQLQuery + 'async_trait,
             Q::Variables: Send + Sync,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Connections that implement this support graphql queries.

Required Associated Types§

Source

type Error

Error type representing any errors that can occurr when querying

Required Methods§

Source

fn query<'life0, 'async_trait, Q>( &'life0 self, variables: Q::Variables, ) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>
where Q: GraphQLQuery + 'async_trait, Q::Variables: Send + Sync, Self: 'async_trait, 'life0: 'async_trait,

Send a graphql query over this connection.

§Errors

This function may error if there was a problem with the underlying connection such as a dns resolution error, or the websocket is disconnected, or if the api returned an error or the api response failed to decode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl QueryConn for glimesh::http::Connection

Source§

impl QueryConn for glimesh::ws::Connection

Source§

impl<C, S> QueryConn for glimesh::hybrid::Connection<C, S>
where C: QueryConn + Send + Sync, S: Send + Sync,