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§
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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".