Trait sauce_api::Sauce [−][src]
pub trait Sauce { 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; fn check_sauce<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<SauceResult, SauceError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; fn check_sauces<'life0, 'life1, 'async_trait>(
&'life0 self,
urls: &'life1 [String]
) -> Pin<Box<dyn Future<Output = Result<Vec<SauceResult>, SauceError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait, { ... } }
Expand description
A generic trait that can be used to standardize the sauce system across different sources.
Required methods
Builds the URL for the given location, allowing one to provide it in case an error happens
fn check_sauce<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<SauceResult, SauceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn check_sauce<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<SauceResult, SauceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Runs the sauce engine against a given URL, providing either results or a ‘String’ as an error.
Provided methods
fn check_sauces<'life0, 'life1, 'async_trait>(
&'life0 self,
urls: &'life1 [String]
) -> Pin<Box<dyn Future<Output = Result<Vec<SauceResult>, SauceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn check_sauces<'life0, 'life1, 'async_trait>(
&'life0 self,
urls: &'life1 [String]
) -> Pin<Box<dyn Future<Output = Result<Vec<SauceResult>, SauceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Just runs check_sauce several times, combining it all into one Vec