Enum libgweather::DistanceUnit
source · #[non_exhaustive]pub enum DistanceUnit {
Invalid,
Default,
Meters,
Km,
Miles,
}
Expand description
The measure unit to use for sky visibility values, when retrieved by gweather_info_get_value_visibility().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Invalid
invalid unit
Default
the user preferred distance unit
Meters
meters
Km
kilometers (= 1000 meters)
Miles
miles
Trait Implementations§
source§impl Clone for DistanceUnit
impl Clone for DistanceUnit
source§fn clone(&self) -> DistanceUnit
fn clone(&self) -> DistanceUnit
Returns a copy 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 DistanceUnit
impl Debug for DistanceUnit
source§impl From<DistanceUnit> for Value
impl From<DistanceUnit> for Value
source§fn from(v: DistanceUnit) -> Self
fn from(v: DistanceUnit) -> Self
Converts to this type from the input type.
source§impl<'a> FromValue<'a> for DistanceUnit
impl<'a> FromValue<'a> for DistanceUnit
§type Checker = GenericValueTypeChecker<DistanceUnit>
type Checker = GenericValueTypeChecker<DistanceUnit>
Value type checker.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl HasParamSpec for DistanceUnit
impl HasParamSpec for DistanceUnit
type ParamSpec = ParamSpecEnum
§type SetValue = DistanceUnit
type SetValue = DistanceUnit
Preferred value to be used as setter for the associated ParamSpec.
type BuilderFn = fn(_: &str, _: DistanceUnit) -> ParamSpecEnumBuilder<'_, DistanceUnit>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for DistanceUnit
impl Hash for DistanceUnit
source§impl Ord for DistanceUnit
impl Ord for DistanceUnit
source§fn cmp(&self, other: &DistanceUnit) -> Ordering
fn cmp(&self, other: &DistanceUnit) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DistanceUnit
impl PartialEq for DistanceUnit
source§fn eq(&self, other: &DistanceUnit) -> bool
fn eq(&self, other: &DistanceUnit) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DistanceUnit
impl PartialOrd for DistanceUnit
source§fn partial_cmp(&self, other: &DistanceUnit) -> Option<Ordering>
fn partial_cmp(&self, other: &DistanceUnit) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for DistanceUnit
impl StaticType for DistanceUnit
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl ToValue for DistanceUnit
impl ToValue for DistanceUnit
source§impl ValueType for DistanceUnit
impl ValueType for DistanceUnit
§type Type = DistanceUnit
type Type = DistanceUnit
Type to get the
Type
from. Read moreimpl Copy for DistanceUnit
impl Eq for DistanceUnit
impl StructuralPartialEq for DistanceUnit
Auto Trait Implementations§
impl Freeze for DistanceUnit
impl RefUnwindSafe for DistanceUnit
impl Send for DistanceUnit
impl Sync for DistanceUnit
impl Unpin for DistanceUnit
impl UnwindSafe for DistanceUnit
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> 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)
🔬This is a nightly-only experimental API. (
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)
🔬This is a nightly-only experimental API. (
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()
Ensures that the type has been registered with the type system.
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.