Struct BeaufortScale
pub struct BeaufortScale(/* private fields */);Expand description
Beaufort scale stored as an integer in 0..=12.
Implementations§
§impl BeaufortScale
impl BeaufortScale
pub fn new(value: u8) -> Result<BeaufortScale, WindValueError>
pub fn new(value: u8) -> Result<BeaufortScale, WindValueError>
Creates a Beaufort scale value in 0..=12.
§Errors
Returns WindValueError::BeaufortOutOfRange when the value is greater than 12.
Trait Implementations§
§impl Clone for BeaufortScale
impl Clone for BeaufortScale
§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 more§impl Debug for BeaufortScale
impl Debug for BeaufortScale
§impl Ord for BeaufortScale
impl Ord for BeaufortScale
§impl PartialEq for BeaufortScale
impl PartialEq for BeaufortScale
§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