aerocontext-core 0.2.1

Provider-neutral aeronautical-context model and the pluggable ContextProvider contract
Documentation
//! The weather-briefing capability.

use async_trait::async_trait;

use crate::model::{AreaBriefingRequest, Briefing};
use crate::provider::{ContextProvider, ProviderError};

/// A provider that can serve an area weather briefing.
///
/// The synchronous request/response weather capability: METAR, TAF, PIREP,
/// SIGMET and similar products for an [`crate::Area`]. A future datalink
/// source such as FIS-B is just another implementor — additive, with no
/// breaking change to this trait or to the `#[non_exhaustive]`
/// [`Briefing`] / [`crate::Product`] it returns.
#[async_trait(?Send)]
pub trait WeatherBriefingProvider: ContextProvider {
    /// Fetch a simple area weather briefing.
    async fn area_briefing(&self, request: &AreaBriefingRequest)
    -> Result<Briefing, ProviderError>;
}