#[non_exhaustive]pub enum WindCompassDirection {
Show 17 variants
North,
NorthNortheast,
Northeast,
EastNortheast,
East,
EastSoutheast,
Southeast,
SouthSoutheast,
South,
SouthSouthwest,
Southwest,
WestSouthwest,
West,
WestNorthwest,
Northwest,
NorthNorthwest,
Unknown(String),
}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.
North
NorthNortheast
Northeast
EastNortheast
East
EastSoutheast
Southeast
SouthSoutheast
South
SouthSouthwest
Southwest
WestSouthwest
West
WestNorthwest
Northwest
NorthNorthwest
Unknown(String)
Implementations§
Source§impl WindCompassDirection
impl WindCompassDirection
pub fn raw_value(&self) -> &str
Sourcepub fn descriptors() -> Result<Vec<WindCompassDirectionDescriptor>, WeatherKitError>
pub fn descriptors() -> Result<Vec<WindCompassDirectionDescriptor>, WeatherKitError>
Examples found in repository?
examples/16_weather_enum_catalog.rs (line 18)
8fn main() -> Result<(), Box<dyn Error>> {
9 println!(
10 "precipitation={:?}",
11 Precipitation::descriptors()?
12 .iter()
13 .map(|descriptor| descriptor.raw_value.as_str())
14 .collect::<Vec<_>>()
15 );
16 println!(
17 "wind_compass={:?}",
18 WindCompassDirection::descriptors()?
19 .iter()
20 .map(|descriptor| descriptor.raw_value.as_str())
21 .collect::<Vec<_>>()
22 );
23 println!(
24 "uv_exposure={:?}",
25 UVExposureCategory::descriptors()?
26 .iter()
27 .map(|descriptor| descriptor.raw_value.as_str())
28 .collect::<Vec<_>>()
29 );
30 println!(
31 "weather_errors={:?}",
32 WeatherError::descriptors()?
33 .iter()
34 .map(|descriptor| descriptor.raw_value.as_str())
35 .collect::<Vec<_>>()
36 );
37
38 support::finish("weather enum catalog");
39 Ok(())
40}Trait Implementations§
Source§impl Clone for WindCompassDirection
impl Clone for WindCompassDirection
Source§fn clone(&self) -> WindCompassDirection
fn clone(&self) -> WindCompassDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WindCompassDirection
impl Debug for WindCompassDirection
Source§impl PartialEq for WindCompassDirection
impl PartialEq for WindCompassDirection
Source§fn eq(&self, other: &WindCompassDirection) -> bool
fn eq(&self, other: &WindCompassDirection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for WindCompassDirection
impl StructuralPartialEq for WindCompassDirection
Auto Trait Implementations§
impl Freeze for WindCompassDirection
impl RefUnwindSafe for WindCompassDirection
impl Send for WindCompassDirection
impl Sync for WindCompassDirection
impl Unpin for WindCompassDirection
impl UnsafeUnpin for WindCompassDirection
impl UnwindSafe for WindCompassDirection
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