pub enum Provider {
Espn(EspnProvider),
ApiFootball(ApiFootballProvider),
FootballData(FootballDataProvider),
}Expand description
A runtime-selected backend. Dispatches to the concrete provider.
Variants§
Espn(EspnProvider)
ESPN backend.
ApiFootball(ApiFootballProvider)
API-Football backend.
FootballData(FootballDataProvider)
football-data.org backend.
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn from_config(config: &ProviderConfig, http: Http) -> Result<Self>
pub fn from_config(config: &ProviderConfig, http: Http) -> Result<Self>
Build the configured provider, validating that any required API key is present.
§Errors
Returns DataError::MissingKey when the selected backend needs an API
key that was not supplied.
Sourcepub async fn match_detail(&self, id: &str) -> Result<MatchDetail>
pub async fn match_detail(&self, id: &str) -> Result<MatchDetail>
Auto Trait Implementations§
impl !RefUnwindSafe for Provider
impl !UnwindSafe for Provider
impl Freeze for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more