pub struct ResistorSpec { /* private fields */ }Expand description
A descriptive resistor specification.
Implementations§
Source§impl ResistorSpec
impl ResistorSpec
Sourcepub const fn new(
resistance: ResistanceValue,
kind: ResistorKind,
) -> ResistorSpec
pub const fn new( resistance: ResistanceValue, kind: ResistorKind, ) -> ResistorSpec
Creates a resistor spec from resistance and kind.
Sourcepub const fn resistance(&self) -> ResistanceValue
pub const fn resistance(&self) -> ResistanceValue
Returns the resistance value.
Sourcepub fn kind(&self) -> ResistorKind
pub fn kind(&self) -> ResistorKind
Returns the resistor kind.
Sourcepub const fn power_rating(&self) -> Option<PowerRating>
pub const fn power_rating(&self) -> Option<PowerRating>
Returns the optional power rating.
Sourcepub const fn with_tolerance(self, tolerance: Tolerance) -> ResistorSpec
pub const fn with_tolerance(self, tolerance: Tolerance) -> ResistorSpec
Returns this spec with a tolerance attached.
Sourcepub const fn with_power_rating(self, power_rating: PowerRating) -> ResistorSpec
pub const fn with_power_rating(self, power_rating: PowerRating) -> ResistorSpec
Returns this spec with a power rating attached.
Trait Implementations§
Source§impl Clone for ResistorSpec
impl Clone for ResistorSpec
Source§fn clone(&self) -> ResistorSpec
fn clone(&self) -> ResistorSpec
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 ResistorSpec
impl Debug for ResistorSpec
Source§impl PartialEq for ResistorSpec
impl PartialEq for ResistorSpec
Source§fn eq(&self, other: &ResistorSpec) -> bool
fn eq(&self, other: &ResistorSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResistorSpec
Auto Trait Implementations§
impl Freeze for ResistorSpec
impl RefUnwindSafe for ResistorSpec
impl Send for ResistorSpec
impl Sync for ResistorSpec
impl Unpin for ResistorSpec
impl UnsafeUnpin for ResistorSpec
impl UnwindSafe for ResistorSpec
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