Skip to main content

QueryMethod

Trait QueryMethod 

Source
pub trait QueryMethod<Q, A>: Sealed
where 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> QueryMethod<Q, A> for GetMethod
where Q: GetQuery, A: AuthToken,

Source§

impl<Q, A> QueryMethod<Q, A> for PostMethod
where Q: PostQuery, A: AuthToken,