Source

Trait Source 

Source
pub trait Source
where Self: Sized,
{ type Argument; // Required methods fn check<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create<'async_trait>( argument: Self::Argument, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where Self: 'async_trait; }
Expand description

The generic trait implemented by all sources under this module.

Required Associated Types§

Source

type Argument

The argument for Source::create

Required Methods§

Source

fn check<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Searches for the source of a given URL.

Source

fn create<'async_trait>( argument: Self::Argument, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Allows for self-modifying the state of the Source, with an additional ‘State’ parameter that can be passed in.

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§