pub struct Voltage(/* private fields */);Expand description
Implementations§
Source§impl Voltage
impl Voltage
Sourcepub const fn from_megav(val: f64) -> Self
pub const fn from_megav(val: f64) -> Self
Create from megavolts. 1 MV = 1e6 V.
Sourcepub fn in_unit(self, unit: VoltageUnit) -> f64
pub fn in_unit(self, unit: VoltageUnit) -> f64
Get value in the specified VoltageUnit.
Sourcepub fn display_as(self, unit: VoltageUnit) -> DisplayWithUnit
pub fn display_as(self, unit: VoltageUnit) -> DisplayWithUnit
Return a display wrapper that formats this voltage in the given unit.
Trait Implementations§
Source§impl AddAssign for Voltage
impl AddAssign for Voltage
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Div<ElectricCurrent> for Voltage
impl Div<ElectricCurrent> for Voltage
Source§type Output = Resistance
type Output = Resistance
The resulting type after applying the
/ operator.Source§fn div(self, rhs: ElectricCurrent) -> Resistance
fn div(self, rhs: ElectricCurrent) -> Resistance
Performs the
/ operation. Read moreSource§impl Div<Voltage> for ElectricCharge
impl Div<Voltage> for ElectricCharge
Source§type Output = Capacitance
type Output = Capacitance
The resulting type after applying the
/ operator.Source§impl DivAssign<f64> for Voltage
impl DivAssign<f64> for Voltage
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl Mul<Capacitance> for Voltage
impl Mul<Capacitance> for Voltage
Source§type Output = ElectricCharge
type Output = ElectricCharge
The resulting type after applying the
* operator.Source§fn mul(self, rhs: Capacitance) -> ElectricCharge
fn mul(self, rhs: Capacitance) -> ElectricCharge
Performs the
* operation. Read moreSource§impl Mul<ElectricCharge> for Voltage
impl Mul<ElectricCharge> for Voltage
Source§impl Mul<ElectricCurrent> for Voltage
impl Mul<ElectricCurrent> for Voltage
Source§impl Mul<Voltage> for Capacitance
impl Mul<Voltage> for Capacitance
Source§type Output = ElectricCharge
type Output = ElectricCharge
The resulting type after applying the
* operator.Source§impl Mul<Voltage> for ElectricCharge
impl Mul<Voltage> for ElectricCharge
Source§impl Mul<Voltage> for ElectricCurrent
impl Mul<Voltage> for ElectricCurrent
Source§impl MulAssign<f64> for Voltage
impl MulAssign<f64> for Voltage
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl PartialOrd for Voltage
impl PartialOrd for Voltage
Source§impl SubAssign for Voltage
impl SubAssign for Voltage
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Voltage
impl StructuralPartialEq for Voltage
Auto Trait Implementations§
impl Freeze for Voltage
impl RefUnwindSafe for Voltage
impl Send for Voltage
impl Sync for Voltage
impl Unpin for Voltage
impl UnsafeUnpin for Voltage
impl UnwindSafe for Voltage
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