pub struct Resistor {
pub material: Material,
pub length_m: f64,
pub area_m2: f64,
}Fields§
§material: Material§length_m: f64§area_m2: f64Implementations§
Source§impl Resistor
impl Resistor
pub fn new(material: Material, length_m: f64, area_m2: f64) -> Self
pub fn resistance_ohm(&self) -> Option<f64>
pub fn resistance_at_ohm(&self, temperature_k: f64) -> Option<f64>
pub fn voltage_drop_v(&self, current_a: f64) -> Option<f64>
pub fn current_a(&self, voltage_v: f64) -> Option<f64>
pub fn power_w(&self, current_a: f64) -> Option<f64>
pub fn ac_resistance_ohm(&self, radius_m: f64, frequency_hz: f64) -> Option<f64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Resistor
impl RefUnwindSafe for Resistor
impl Send for Resistor
impl Sync for Resistor
impl Unpin for Resistor
impl UnsafeUnpin for Resistor
impl UnwindSafe for Resistor
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