Skip to main content

SourceStream

Trait SourceStream 

Source
pub trait SourceStream:
    Stream<Item = Result<Bytes, Self::Error>>
    + Unpin
    + Send
    + Sync
    + Sized
    + 'static {
    type Url: Send;
    type Error: Error + Send;

    // Required methods
    fn create<'async_trait>(
        url: Self::Url,
        is_radio: bool,
        radio_title: Arc<Mutex<String>>,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn content_length<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn seek_range<'life0, 'async_trait>(
        &'life0 mut self,
        start: u64,
        end: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn create<'async_trait>( url: Self::Url, is_radio: bool, radio_title: Arc<Mutex<String>>, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn content_length<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn seek_range<'life0, 'async_trait>( &'life0 mut self, start: u64, end: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§