[][src]Trait sauce_api::Sauce

pub trait Sauce {
#[must_use]    pub fn build_url<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String, SauceError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn check_sauce<'life0, 'async_trait>(
        &'life0 self,
        url: String
    ) -> Pin<Box<dyn Future<Output = Result<SauceResult, SauceError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] pub fn check_sauces<'life0, 'async_trait>(
        &'life0 self,
        urls: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SauceResult>, SauceError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... } }

A generic trait that can be used to standardize the sauce system across different sources.

Required methods

#[must_use]pub fn build_url<'life0, 'life1, 'async_trait>(
    &'life0 self,
    url: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, SauceError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Builds the URL for the given location, allowing one to provide it in case an error happens

#[must_use]pub fn check_sauce<'life0, 'async_trait>(
    &'life0 self,
    url: String
) -> Pin<Box<dyn Future<Output = Result<SauceResult, SauceError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Runs the sauce engine against a given URL, providing either results or a 'String' as an error.

Loading content...

Provided methods

#[must_use]pub fn check_sauces<'life0, 'async_trait>(
    &'life0 self,
    urls: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<Vec<SauceResult>, SauceError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

Just runs check_sauce several times, combining it all into one Vec

Loading content...

Implementors

impl Sauce for IQDB[src]

impl Sauce for SauceNao[src]

impl Sauce for Yandex[src]

Loading content...