TranscriptProvider

Trait TranscriptProvider 

Source
pub trait TranscriptProvider: Send + Sync {
    // Required methods
    fn extract_transcript<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<TranscriptResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn name(&self) -> &str;
    fn supports_url(&self, url: &str) -> bool;
}
Expand description

Transcript provider trait for different backends

Required Methods§

Source

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

Extract transcript from a video URL

Source

fn name(&self) -> &str

Get provider name

Source

fn supports_url(&self, url: &str) -> bool

Check if this provider supports the given URL

Implementors§