pub enum ElectricError {
NonFinite(&'static str),
Negative(&'static str),
Zero(&'static str),
UnderdeterminedResistance,
ZeroPower,
EmptyResistanceNetwork,
CalculationOutOfRange,
}Expand description
Invalid electrical input or a calculation outside finite numeric range.
Variants§
NonFinite(&'static str)
A named input was not finite.
Negative(&'static str)
A named input was negative.
Zero(&'static str)
A named input had to be positive but was zero.
UnderdeterminedResistance
Zero voltage or current could not determine a finite positive resistance.
ZeroPower
Runtime cannot be calculated at zero power.
EmptyResistanceNetwork
An equivalent resistance was requested for no resistors.
CalculationOutOfRange
Arithmetic produced a non-finite or unrepresentable result.
Trait Implementations§
Source§impl Clone for ElectricError
impl Clone for ElectricError
Source§impl Debug for ElectricError
impl Debug for ElectricError
Source§impl Display for ElectricError
impl Display for ElectricError
impl Eq for ElectricError
Source§impl Error for ElectricError
impl Error for ElectricError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ElectricError
impl PartialEq for ElectricError
impl StructuralPartialEq for ElectricError
Auto Trait Implementations§
impl Freeze for ElectricError
impl RefUnwindSafe for ElectricError
impl Send for ElectricError
impl Sync for ElectricError
impl Unpin for ElectricError
impl UnsafeUnpin for ElectricError
impl UnwindSafe for ElectricError
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