Trait QueryMethod

Source
pub trait QueryMethod<Q, A, O>: Sealed
where Q: Query<A>, A: AuthToken,
{ // Required method async fn call<'a>( query: &'a Q, client: &Client, tok: &A, ) -> Result<RawResult<'a, Q, A>>; }
Expand description

Represents a method of calling an query, using a query, client and auth token. Not intended to be implemented by api users, the pre-implemented GetMethod and PostMethod structs should be sufficient, and in addition, async methods are required currently.

Required Methods§

Source

async fn call<'a>( query: &'a Q, client: &Client, tok: &A, ) -> Result<RawResult<'a, Q, A>>

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<Q, A, O> QueryMethod<Q, A, O> for GetMethod
where Q: GetQuery + Query<A, Output = O>, A: AuthToken,

Source§

impl<Q, A, O> QueryMethod<Q, A, O> for PostMethod
where Q: PostQuery + Query<A, Output = O>, A: AuthToken,