Enum libgweather::LocationLevel
source · #[non_exhaustive]pub enum LocationLevel {
World,
Region,
Country,
Adm1,
City,
WeatherStation,
Detached,
NamedTimezone,
}
Expand description
The size/scope of a particular Location
.
Locations form a hierarchy, with a GWEATHER_LOCATION_WORLD
location
at the top, divided into regions or countries, and so on.
Countries may or may not be divided into “adm1“s, and “adm1“s may or may not be divided into “adm2“s. A city will have at least one, and possibly several, weather stations inside it. Weather stations will never appear outside of cities.
Building a database with Location::world()
will never
create detached instances, but deserializing might.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
World
A location representing the entire world
Region
A location representing a continent or other top-level region
Country
A location representing a “country” (or other geographic unit that has an ISO-3166 country code)
Adm1
A location representing a “first-level administrative division”; ie, a state, province, or similar division
City
A location representing a city
WeatherStation
A location representing a weather station
Detached
A location that is detached from the database, for example because it was loaded from external storage and could not be fully recovered. The parent of this location is the nearest weather station
NamedTimezone
A location representing a named or special timezone in the world, such as UTC
Implementations§
Trait Implementations§
source§impl Clone for LocationLevel
impl Clone for LocationLevel
source§fn clone(&self) -> LocationLevel
fn clone(&self) -> LocationLevel
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocationLevel
impl Debug for LocationLevel
source§impl Display for LocationLevel
impl Display for LocationLevel
source§impl From<LocationLevel> for Value
impl From<LocationLevel> for Value
source§fn from(v: LocationLevel) -> Self
fn from(v: LocationLevel) -> Self
source§impl<'a> FromValue<'a> for LocationLevel
impl<'a> FromValue<'a> for LocationLevel
§type Checker = GenericValueTypeChecker<LocationLevel>
type Checker = GenericValueTypeChecker<LocationLevel>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl HasParamSpec for LocationLevel
impl HasParamSpec for LocationLevel
type ParamSpec = ParamSpecEnum
§type SetValue = LocationLevel
type SetValue = LocationLevel
type BuilderFn = fn(_: &str, _: LocationLevel) -> ParamSpecEnumBuilder<'_, LocationLevel>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for LocationLevel
impl Hash for LocationLevel
source§impl Ord for LocationLevel
impl Ord for LocationLevel
source§fn cmp(&self, other: &LocationLevel) -> Ordering
fn cmp(&self, other: &LocationLevel) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LocationLevel
impl PartialEq for LocationLevel
source§fn eq(&self, other: &LocationLevel) -> bool
fn eq(&self, other: &LocationLevel) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LocationLevel
impl PartialOrd for LocationLevel
source§fn partial_cmp(&self, other: &LocationLevel) -> Option<Ordering>
fn partial_cmp(&self, other: &LocationLevel) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for LocationLevel
impl StaticType for LocationLevel
source§fn static_type() -> Type
fn static_type() -> Type
Self
.source§impl ToValue for LocationLevel
impl ToValue for LocationLevel
source§impl ValueType for LocationLevel
impl ValueType for LocationLevel
§type Type = LocationLevel
type Type = LocationLevel
Type
from. Read moreimpl Copy for LocationLevel
impl Eq for LocationLevel
impl StructuralPartialEq for LocationLevel
Auto Trait Implementations§
impl Freeze for LocationLevel
impl RefUnwindSafe for LocationLevel
impl Send for LocationLevel
impl Sync for LocationLevel
impl Unpin for LocationLevel
impl UnwindSafe for LocationLevel
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.