#[non_exhaustive]#[repr(u8)]pub enum WmoCode {
Show 28 variants
ClearSky = 0,
MainlyClear = 1,
PartlyCloudy = 2,
Overcast = 3,
Fog = 45,
DepositingRimeFog = 48,
DrizzleLight = 51,
DrizzleModerate = 53,
DrizzleDense = 55,
FreezingDrizzleLight = 56,
FreezingDrizzleDense = 57,
RainSlight = 61,
RainModerate = 63,
RainHeavy = 65,
FreezingRainLight = 66,
FreezingRainHeavy = 67,
SnowFallSlight = 71,
SnowFallModerate = 73,
SnowFallHeavy = 75,
SnowGrains = 77,
RainShowersSlight = 80,
RainShowersModerate = 81,
RainShowersViolent = 82,
SnowShowersSlight = 85,
SnowShowersHeavy = 86,
ThunderstormSlightOrModerate = 95,
ThunderstormWithSlightHail = 96,
ThunderstormWithHeavyHail = 99,
}Expand description
Open-Meteo subset of WMO present weather codes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClearSky = 0
Clear sky.
MainlyClear = 1
Mainly clear.
PartlyCloudy = 2
Partly cloudy.
Overcast = 3
Overcast.
Fog = 45
Fog.
DepositingRimeFog = 48
Depositing rime fog.
DrizzleLight = 51
Light drizzle.
DrizzleModerate = 53
Moderate drizzle.
DrizzleDense = 55
Dense drizzle.
FreezingDrizzleLight = 56
Light freezing drizzle.
FreezingDrizzleDense = 57
Dense freezing drizzle.
RainSlight = 61
Slight rain.
RainModerate = 63
Moderate rain.
RainHeavy = 65
Heavy rain.
FreezingRainLight = 66
Light freezing rain.
FreezingRainHeavy = 67
Heavy freezing rain.
SnowFallSlight = 71
Slight snow fall.
SnowFallModerate = 73
Moderate snow fall.
SnowFallHeavy = 75
Heavy snow fall.
SnowGrains = 77
Snow grains.
RainShowersSlight = 80
Slight rain showers.
RainShowersModerate = 81
Moderate rain showers.
RainShowersViolent = 82
Violent rain showers.
SnowShowersSlight = 85
Slight snow showers.
SnowShowersHeavy = 86
Heavy snow showers.
ThunderstormSlightOrModerate = 95
Slight or moderate thunderstorm.
ThunderstormWithSlightHail = 96
Thunderstorm with slight hail.
ThunderstormWithHeavyHail = 99
Thunderstorm with heavy hail.
Implementations§
Source§impl WmoCode
impl WmoCode
Sourcepub fn from_code(code: u8) -> Option<Self>
pub fn from_code(code: u8) -> Option<Self>
Converts the numeric API code into a known enum value.
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Human-readable Open-Meteo weather-code description.
Sourcepub fn is_precipitating(self) -> bool
pub fn is_precipitating(self) -> bool
Returns whether this weather code implies precipitation.
Sourcepub fn is_thunderstorm(self) -> bool
pub fn is_thunderstorm(self) -> bool
Returns whether this weather code is a thunderstorm.
Trait Implementations§
impl Copy for WmoCode
impl Eq for WmoCode
impl StructuralPartialEq for WmoCode
Auto Trait Implementations§
impl Freeze for WmoCode
impl RefUnwindSafe for WmoCode
impl Send for WmoCode
impl Sync for WmoCode
impl Unpin for WmoCode
impl UnsafeUnpin for WmoCode
impl UnwindSafe for WmoCode
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.