pub trait FetchStrategy {
// Required methods
fn name(&self) -> &'static str;
fn fetch_channel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
client: &'life1 Client,
channel_name: &'life2 str,
config: &'life3 StrategyConfig,
) -> Pin<Box<dyn Future<Output = FetchResult<ChannelInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn is_enabled(&self, _config: &StrategyConfig) -> bool { ... }
}Expand description
Base strategy trait for all fetching approaches
Required Methods§
Sourcefn fetch_channel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
client: &'life1 Client,
channel_name: &'life2 str,
config: &'life3 StrategyConfig,
) -> Pin<Box<dyn Future<Output = FetchResult<ChannelInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fetch_channel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
client: &'life1 Client,
channel_name: &'life2 str,
config: &'life3 StrategyConfig,
) -> Pin<Box<dyn Future<Output = FetchResult<ChannelInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Fetch channel information using this strategy
Provided Methods§
Sourcefn is_enabled(&self, _config: &StrategyConfig) -> bool
fn is_enabled(&self, _config: &StrategyConfig) -> bool
Check if this strategy is available/enabled