aerocontext_core/ownship.rs
1//! The ownship-status capability.
2//!
3//! Stub: the trait and its payload exist so a telemetry source can be added
4//! later as a sibling capability, but no adapter implements it yet.
5
6use async_trait::async_trait;
7
8use crate::provider::{ContextProvider, ProviderError};
9
10/// Live ownship state (position, altitude, track, …).
11///
12/// Placeholder pending a real telemetry source. `#[non_exhaustive]`, so
13/// fields can be added later without breaking implementors.
14#[derive(Debug, Clone, Default, PartialEq)]
15#[non_exhaustive]
16pub struct OwnshipStatus {}
17
18/// A provider of ownship status — a sibling capability to
19/// [`crate::WeatherBriefingProvider`] under the same [`ContextProvider`]
20/// identity.
21#[async_trait(?Send)]
22pub trait OwnshipStatusProvider: ContextProvider {
23 /// Fetch the latest ownship status.
24 async fn ownship_status(&self) -> Result<OwnshipStatus, ProviderError>;
25}