Trait Query

Source
pub trait Query<C> {
    type Result;

    // Required method
    fn execute<'life0, 'async_trait>(
        self,
        client: &'life0 C,
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait which represents an asynchronous query which may be made to a Postmark client.

Required Associated Types§

Source

type Result

The Result of executing a query

Required Methods§

Source

fn execute<'life0, 'async_trait>( self, client: &'life0 C, ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform the query against the client.

Implementors§

Source§

impl<T, C> Query<C> for T
where T: Endpoint + Send + Sync, C: Client + Send + Sync,

Extension method to all Endpoints to execute themselves againts a query