pub struct AtcScopePackage {
pub facilities: Vec<AtcFacility>,
pub maps: HashMap<String, AtcMap>,
pub symbols: HashMap<String, AtcMapSymbol>,
pub display_types: HashMap<String, AtcDisplayType>,
}Fields§
§facilities: Vec<AtcFacility>§maps: HashMap<String, AtcMap>§symbols: HashMap<String, AtcMapSymbol>§display_types: HashMap<String, AtcDisplayType>Implementations§
Source§impl AtcScopePackage
impl AtcScopePackage
Sourcepub fn export_to_gzip(
&self,
file_name: impl AsRef<Path>,
maps_dir: impl AsRef<Path>,
) -> Result<()>
pub fn export_to_gzip( &self, file_name: impl AsRef<Path>, maps_dir: impl AsRef<Path>, ) -> Result<()>
Exports the entire ATC Scope Package to a file.
File is tarred and gzipped.
All video maps are externalized from the main JSON file to allow lazy loading. These video maps are GeoJSON FeatureCollections
Format is as follows:
<name>.atcpkgScopePackage.jsonmaps<videomap>.geojson- …
pub fn import_from_gzip( file_name: impl AsRef<Path>, out_dir: impl AsRef<Path>, ) -> Result<Self>
Sourcepub fn try_load_map_data(
&mut self,
map_id: &str,
maps_dir: impl AsRef<Path>,
) -> Result<Option<&AtcMap>>
pub fn try_load_map_data( &mut self, map_id: &str, maps_dir: impl AsRef<Path>, ) -> Result<Option<&AtcMap>>
Attempts to lazy load a map.
If the map is embedded it will return immediately, otherwise it will load the map from the JSON file.
The map in this package will be replaced with the embedded one for performance.
Trait Implementations§
Source§impl Clone for AtcScopePackage
impl Clone for AtcScopePackage
Source§fn clone(&self) -> AtcScopePackage
fn clone(&self) -> AtcScopePackage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AtcScopePackage
impl Debug for AtcScopePackage
Source§impl Default for AtcScopePackage
impl Default for AtcScopePackage
Source§fn default() -> AtcScopePackage
fn default() -> AtcScopePackage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AtcScopePackage
impl<'de> Deserialize<'de> for AtcScopePackage
Source§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§impl Serialize for AtcScopePackage
impl Serialize for AtcScopePackage
Source§impl TryFrom<&CrcPackage> for AtcScopePackage
impl TryFrom<&CrcPackage> for AtcScopePackage
Source§impl TryFrom<EuroScopeResult> for AtcScopePackage
impl TryFrom<EuroScopeResult> for AtcScopePackage
Auto Trait Implementations§
impl Freeze for AtcScopePackage
impl RefUnwindSafe for AtcScopePackage
impl Send for AtcScopePackage
impl Sync for AtcScopePackage
impl Unpin for AtcScopePackage
impl UnwindSafe for AtcScopePackage
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