Struct rtzlib::NedTimezone
source · pub struct NedTimezone {
pub id: usize,
pub identifier: Option<Cow<'static, str>>,
pub description: String,
pub dst_description: Option<Cow<'static, str>>,
pub offset: Cow<'static, str>,
pub zone: f32,
pub raw_offset: i32,
pub geometry: EncodableGeometry,
}Expand description
A representation of the Natural Earth Data
geojson
geojson::Features.
Fields§
§id: usizeThe index of the NedTimezone in the global static cache.
This is is not stable across builds or new data sets. It is merely unique during a single build.
identifier: Option<Cow<'static, str>>The identifier of the NedTimezone (e.g., America/Los_Angeles).
Essentially, it is the IANA TZ identifier.
description: StringThe description of the NedTimezone (e.g., the countries affected).
dst_description: Option<Cow<'static, str>>The dst_description of the NedTimezone (i.e., daylight savings time information).
offset: Cow<'static, str>The offset of the NedTimezone (e.g., UTC-8:00).
zone: f32The zone_num of the NedTimezone (e.g., -8.0).
raw_offset: i32The raw_offset of the NedTimezone (e.g., -28800).
geometry: EncodableGeometryThe geometry of the NedTimezone.
Trait Implementations§
source§impl CanGetGeoJsonFeaturesFromSource for NedTimezone
impl CanGetGeoJsonFeaturesFromSource for NedTimezone
source§fn get_geojson_features_from_source() -> FeatureCollection
fn get_geojson_features_from_source() -> FeatureCollection
Get the GeoJSON features from a source.
source§impl CanPerformGeoLookup for NedTimezone
impl CanPerformGeoLookup for NedTimezone
source§fn lookup(xf: Float, yf: Float) -> Vec<&'static Self>
fn lookup(xf: Float, yf: Float) -> Vec<&'static Self>
Get the cache-driven item for a given longitude (x) and latitude (y). Read more
source§fn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self>
fn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self>
Get the exact item for a given longitude (x) and latitude (y).
source§fn memory_data_to_geojson() -> String
fn memory_data_to_geojson() -> String
Gets the geojson representation of the memory cache.
source§fn get_lookup_suggestions(
x: RoundDegree,
y: RoundDegree
) -> Option<Vec<&'static Self>>
fn get_lookup_suggestions( x: RoundDegree, y: RoundDegree ) -> Option<Vec<&'static Self>>
Get value from the static memory cache.
source§impl Debug for NedTimezone
impl Debug for NedTimezone
source§impl From<&'static NedTimezone> for NedTimezoneResponse1
impl From<&'static NedTimezone> for NedTimezoneResponse1
source§fn from(value: &'static NedTimezone) -> NedTimezoneResponse1
fn from(value: &'static NedTimezone) -> NedTimezoneResponse1
Converts to this type from the input type.
source§impl HasGeometry for NedTimezone
impl HasGeometry for NedTimezone
source§fn id(&self) -> usize
fn id(&self) -> usize
Get the
id of the HasGeometry.source§fn geometry(&self) -> &Geometry<f32>
fn geometry(&self) -> &Geometry<f32>
Get the [
Geometry] of the HasGeometry.source§impl HasItemData for NedTimezone
impl HasItemData for NedTimezone
source§fn get_mem_items() -> &'static ConcreteVec<NedTimezone>
fn get_mem_items() -> &'static ConcreteVec<NedTimezone>
Gets the items from the in-memory cache for the given type.
source§impl HasLookupData for NedTimezone
impl HasLookupData for NedTimezone
§type Lookup = EncodableIds
type Lookup = EncodableIds
The type to which the lookup hash table resolves.
source§fn get_mem_lookup() -> &'static HashMap<RoundLngLat, Self::Lookup>
fn get_mem_lookup() -> &'static HashMap<RoundLngLat, Self::Lookup>
Gets the lookup hash table from the in-memory cache for the given type.
source§impl HasProperties for NedTimezone
impl HasProperties for NedTimezone
source§fn properties(&self) -> Map<String, Value>
fn properties(&self) -> Map<String, Value>
Get the properties of the
HasProperties.source§impl IsTimezone for NedTimezone
impl IsTimezone for NedTimezone
source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
Get the
identifier of the IsTimezone.source§impl PartialEq<NedTimezone> for NedTimezone
impl PartialEq<NedTimezone> for NedTimezone
source§fn eq(&self, other: &NedTimezone) -> bool
fn eq(&self, other: &NedTimezone) -> bool
This method tests for
self and other values to be equal, and is used
by ==.Auto Trait Implementations§
impl RefUnwindSafe for NedTimezone
impl Send for NedTimezone
impl Sync for NedTimezone
impl Unpin for NedTimezone
impl UnwindSafe for NedTimezone
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToGeoJsonFeature for Twhere
T: HasGeometry + HasProperties,
impl<T> ToGeoJsonFeature for Twhere T: HasGeometry + HasProperties,
source§fn to_feature(&self) -> Feature
fn to_feature(&self) -> Feature
Convert the type to GeoJSON.