pub struct BeaufortScale(/* private fields */);Expand description
Beaufort scale stored as an integer in 0..=12.
Implementations§
Source§impl BeaufortScale
impl BeaufortScale
Sourcepub fn new(value: u8) -> Result<Self, WindValueError>
pub fn new(value: u8) -> Result<Self, WindValueError>
Creates a Beaufort scale value in 0..=12.
§Errors
Returns WindValueError::BeaufortOutOfRange when the value is greater than 12.
Trait Implementations§
Source§impl Clone for BeaufortScale
impl Clone for BeaufortScale
Source§fn clone(&self) -> BeaufortScale
fn clone(&self) -> BeaufortScale
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 moreSource§impl Debug for BeaufortScale
impl Debug for BeaufortScale
Source§impl Ord for BeaufortScale
impl Ord for BeaufortScale
Source§fn cmp(&self, other: &BeaufortScale) -> Ordering
fn cmp(&self, other: &BeaufortScale) -> 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 BeaufortScale
impl PartialEq for BeaufortScale
Source§impl PartialOrd for BeaufortScale
impl PartialOrd for BeaufortScale
impl Copy for BeaufortScale
impl Eq for BeaufortScale
impl StructuralPartialEq for BeaufortScale
Auto Trait Implementations§
impl Freeze for BeaufortScale
impl RefUnwindSafe for BeaufortScale
impl Send for BeaufortScale
impl Sync for BeaufortScale
impl Unpin for BeaufortScale
impl UnsafeUnpin for BeaufortScale
impl UnwindSafe for BeaufortScale
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