Struct WindDirection
pub struct WindDirection(/* private fields */);Expand description
Wind direction stored as degrees clockwise from north.
Implementations§
§impl WindDirection
impl WindDirection
pub fn new(degrees_from_north: f64) -> Result<WindDirection, WindValueError>
pub fn new(degrees_from_north: f64) -> Result<WindDirection, WindValueError>
Creates wind direction from a finite degree value in 0.0..360.0.
§Errors
Returns WindValueError when the direction is invalid.
pub fn degrees_from_north(&self) -> f64
pub fn degrees_from_north(&self) -> f64
Returns the stored direction in degrees from north.
Trait Implementations§
§impl Clone for WindDirection
impl Clone for WindDirection
§fn clone(&self) -> WindDirection
fn clone(&self) -> WindDirection
Returns a duplicate 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 more§impl Debug for WindDirection
impl Debug for WindDirection
§impl PartialEq for WindDirection
impl PartialEq for WindDirection
§impl PartialOrd for WindDirection
impl PartialOrd for WindDirection
impl Copy for WindDirection
impl StructuralPartialEq for WindDirection
Auto Trait Implementations§
impl Freeze for WindDirection
impl RefUnwindSafe for WindDirection
impl Send for WindDirection
impl Sync for WindDirection
impl Unpin for WindDirection
impl UnsafeUnpin for WindDirection
impl UnwindSafe for WindDirection
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