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