#[non_exhaustive]pub struct Front {
pub layer: u32,
pub kind: WeatherPhenomenonEffect,
pub position: [f64; 3],
pub radius: f32,
pub remaining: Duration,
}Expand description
A front of weather, from Weather::fronts.
§Examples
use enshwick::weather::WeatherPhenomenonEffect;
fn storms(weather: &enshwick::weather::Weather) -> usize {
weather.fronts().iter().filter(|front| front.kind == WeatherPhenomenonEffect::Blizzard).count()
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.layer: u32The weather layer it belongs to.
kind: WeatherPhenomenonEffectWhat it brings.
position: [f64; 3]Where it is, in metres.
radius: f32How far it reaches, in metres.
remaining: DurationHow long it has left, in game time.
Trait Implementations§
impl Copy for Front
impl StructuralPartialEq for Front
Auto Trait Implementations§
impl Freeze for Front
impl RefUnwindSafe for Front
impl Send for Front
impl Sync for Front
impl Unpin for Front
impl UnsafeUnpin for Front
impl UnwindSafe for Front
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