Request

Trait Request 

Source
pub trait Request {
    // Required methods
    fn get<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        query: &'life1 T,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where T: Serialize + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_details<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 GetAnimeDetails,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_ranking<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 GetAnimeRanking,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_seasonal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 GetSeasonalAnime,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 GetUserAnimeList,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_next_or_prev<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: Option<&'life1 String>,
    ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

This trait defines the common request methods available to both Client and Oauth AnimeApiClients

Required Methods§

Source

fn get<'life0, 'life1, 'async_trait, T>( &'life0 self, query: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where T: Serialize + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_details<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 GetAnimeDetails, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_ranking<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 GetAnimeRanking, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_seasonal<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 GetSeasonalAnime, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_user<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 GetUserAnimeList, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_next_or_prev<'life0, 'life1, 'async_trait>( &'life0 self, query: Option<&'life1 String>, ) -> Pin<Box<dyn Future<Output = Result<String, AnimeApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§