#[non_exhaustive]pub struct NavDataSnapshot {
pub cycle: NavDataCycle,
pub points: Vec<NavPoint>,
pub airways: Vec<Airway>,
pub runways: Vec<Runway>,
pub airspaces: Vec<Airspace>,
}Expand description
A cycle-tagged set of published navigation points and airways.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cycle: NavDataCyclePublication-cycle metadata.
points: Vec<NavPoint>Airports, waypoints, and navaids in this snapshot.
airways: Vec<Airway>Published airways, when the source carries them.
runways: Vec<Runway>Published runways, when the source carries them.
airspaces: Vec<Airspace>Published airspace volumes, when the source carries them.
Implementations§
Sourcepub fn new(cycle: NavDataCycle, points: Vec<NavPoint>) -> Self
pub fn new(cycle: NavDataCycle, points: Vec<NavPoint>) -> Self
A snapshot for one publication cycle, without airways.
Sourcepub fn with_airways(self, airways: Vec<Airway>) -> Self
pub fn with_airways(self, airways: Vec<Airway>) -> Self
Set the airways.
Sourcepub fn with_runways(self, runways: Vec<Runway>) -> Self
pub fn with_runways(self, runways: Vec<Runway>) -> Self
Set the runways.
Sourcepub fn with_airspaces(self, airspaces: Vec<Airspace>) -> Self
pub fn with_airspaces(self, airspaces: Vec<Airspace>) -> Self
Set the airspaces.
Sourcepub fn runways_at<'a>(
&'a self,
airport_ident: &'a str,
) -> impl Iterator<Item = &'a Runway>
pub fn runways_at<'a>( &'a self, airport_ident: &'a str, ) -> impl Iterator<Item = &'a Runway>
Runways at an airport, by its identifier, case-insensitively.
Sourcepub fn airspaces_at<'a>(
&'a self,
center_ident: &'a str,
) -> impl Iterator<Item = &'a Airspace>
pub fn airspaces_at<'a>( &'a self, center_ident: &'a str, ) -> impl Iterator<Item = &'a Airspace>
Controlled airspace centered on an airport, by its identifier, case-insensitively (a layered Class B/C yields one entry per shelf).
Sourcepub fn resolve(&self, ident: &str) -> Option<&NavPoint>
pub fn resolve(&self, ident: &str) -> Option<&NavPoint>
Find a navigation point by identifier, case-insensitively.
Sourcepub fn resolve_preferring_region(
&self,
ident: &str,
region: Option<&str>,
) -> Option<&NavPoint>
pub fn resolve_preferring_region( &self, ident: &str, region: Option<&str>, ) -> Option<&NavPoint>
Self::resolve, preferring an exact (ident, region) match when
a region hint is given (airway points carry one), falling back to
the first ident match.
Sourcepub fn airways_named<'a>(
&'a self,
designator: &'a str,
) -> impl Iterator<Item = &'a Airway>
pub fn airways_named<'a>( &'a self, designator: &'a str, ) -> impl Iterator<Item = &'a Airway>
Airways matching a designator, case-insensitively (the same ident
can exist per AirwayLocation).
Trait Implementations§
Source§fn clone(&self) -> NavDataSnapshot
fn clone(&self) -> NavDataSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§fn eq(&self, other: &NavDataSnapshot) -> bool
fn eq(&self, other: &NavDataSnapshot) -> bool
self and other values to be equal, and is used by ==.