pub trait StreamProvider: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn matches(&self, url: &str) -> bool;
fn get_stream_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<StreamInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_series<'life0, 'life1, 'async_trait>(
&'life0 self,
series_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SeriesInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<EpisodeInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for streaming service providers.
Implementors extract stream metadata from service-specific APIs and
return normalized StreamInfo / SeriesInfo that the backends
can consume.
Required Methods§
Sourcefn get_stream_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<StreamInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_stream_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<StreamInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch stream metadata for a program/video identified by id.
Sourcefn list_series<'life0, 'life1, 'async_trait>(
&'life0 self,
series_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SeriesInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_series<'life0, 'life1, 'async_trait>(
&'life0 self,
series_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SeriesInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all episodes in a series or playlist.