pub struct PowerRating { /* private fields */ }Expand description
A power rating in watts.
Implementations§
Source§impl PowerRating
impl PowerRating
Sourcepub fn new_watts(value: f64) -> Result<Self, RatingError>
pub fn new_watts(value: f64) -> Result<Self, RatingError>
Creates a non-negative power rating in watts.
§Errors
Returns RatingError when the value is not finite or is negative.
Trait Implementations§
Source§impl Clone for PowerRating
impl Clone for PowerRating
Source§fn clone(&self) -> PowerRating
fn clone(&self) -> PowerRating
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 PowerRating
impl Debug for PowerRating
Source§impl Display for PowerRating
impl Display for PowerRating
Source§impl PartialEq for PowerRating
impl PartialEq for PowerRating
Source§fn eq(&self, other: &PowerRating) -> bool
fn eq(&self, other: &PowerRating) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PowerRating
impl PartialOrd for PowerRating
impl Copy for PowerRating
impl StructuralPartialEq for PowerRating
Auto Trait Implementations§
impl Freeze for PowerRating
impl RefUnwindSafe for PowerRating
impl Send for PowerRating
impl Sync for PowerRating
impl Unpin for PowerRating
impl UnsafeUnpin for PowerRating
impl UnwindSafe for PowerRating
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