pub struct Zone {Show 20 fields
pub id: ZoneIndex,
pub osm_id: String,
pub admin_level: Option<u32>,
pub zone_type: Option<ZoneType>,
pub name: String,
pub loc_name: String,
pub alt_name: String,
pub label: String,
pub international_labels: BTreeMap<String, String>,
pub international_names: BTreeMap<String, String>,
pub zip_codes: Vec<String>,
pub center: Option<Coord>,
pub boundary: Option<MultiPolygon<f64>>,
pub bbox: Option<Rect<f64>>,
pub tags: Tags,
pub center_tags: Tags,
pub parent: Option<ZoneIndex>,
pub wikidata: Option<String>,
pub is_generated: bool,
pub country_code: Option<String>,
}
Fields§
§id: ZoneIndex
§osm_id: String
§admin_level: Option<u32>
§zone_type: Option<ZoneType>
§name: String
§loc_name: String
§alt_name: String
§label: String
§international_labels: BTreeMap<String, String>
§international_names: BTreeMap<String, String>
§zip_codes: Vec<String>
§center: Option<Coord>
§boundary: Option<MultiPolygon<f64>>
§bbox: Option<Rect<f64>>
§parent: Option<ZoneIndex>
§wikidata: Option<String>
§is_generated: bool
§country_code: Option<String>
Implementations§
source§impl Zone
impl Zone
pub fn is_admin(&self) -> bool
pub fn admin_type(&self) -> Option<ZoneType>
pub fn set_parent(&mut self, idx: Option<ZoneIndex>)
sourcepub fn iter_hierarchy<'a>(
&'a self,
all_zones: &'a MutableSlice<'_>
) -> HierarchyIterator<'a>
pub fn iter_hierarchy<'a>( &'a self, all_zones: &'a MutableSlice<'_> ) -> HierarchyIterator<'a>
iter_hierarchy gives an iterator over the whole hierachy including self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Zone
impl<'de> Deserialize<'de> for Zone
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
Auto Trait Implementations§
impl RefUnwindSafe for Zone
impl Send for Zone
impl Sync for Zone
impl Unpin for Zone
impl UnwindSafe for Zone
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