Skip to main content

SourcePlugin

Trait SourcePlugin 

Source
pub trait SourcePlugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn can_handle(&self, identifier: &str) -> bool;
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identifier: &'life1 str,
        routeplanner: Option<Arc<dyn RoutePlanner>>,
    ) -> Pin<Box<dyn Future<Output = LoadResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn get_track<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _identifier: &'life1 str,
        _routeplanner: Option<Arc<dyn RoutePlanner>>,
    ) -> Pin<Box<dyn Future<Output = Option<BoxedTrack>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn load_search<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _query: &'life1 str,
        _types: &'life2 [String],
        _routeplanner: Option<Arc<dyn RoutePlanner>>,
    ) -> Pin<Box<dyn Future<Output = Option<SearchResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn get_proxy_config(&self) -> Option<HttpProxyConfig> { ... }
    fn search_prefixes(&self) -> Vec<&str> { ... }
    fn isrc_prefixes(&self) -> Vec<&str> { ... }
    fn rec_prefixes(&self) -> Vec<&str> { ... }
    fn is_mirror(&self) -> bool { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn can_handle(&self, identifier: &str) -> bool

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, routeplanner: Option<Arc<dyn RoutePlanner>>, ) -> Pin<Box<dyn Future<Output = LoadResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn get_track<'life0, 'life1, 'async_trait>( &'life0 self, _identifier: &'life1 str, _routeplanner: Option<Arc<dyn RoutePlanner>>, ) -> Pin<Box<dyn Future<Output = Option<BoxedTrack>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_proxy_config(&self) -> Option<HttpProxyConfig>

Source

fn search_prefixes(&self) -> Vec<&str>

Source

fn isrc_prefixes(&self) -> Vec<&str>

Source

fn rec_prefixes(&self) -> Vec<&str>

Source

fn is_mirror(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§