#[non_exhaustive]pub struct NavDataSnapshot {
pub cycle: NavDataCycle,
pub points: Vec<NavPoint>,
pub airways: Vec<Airway>,
}Expand description
A cycle-tagged set of published navigation points and airways.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§fn eq(&self, other: &NavDataSnapshot) -> bool
fn eq(&self, other: &NavDataSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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