pub struct CapacitorSpec { /* private fields */ }Expand description
A descriptive capacitor specification.
Implementations§
Source§impl CapacitorSpec
impl CapacitorSpec
Sourcepub const fn new(capacitance: CapacitanceValue, kind: CapacitorKind) -> Self
pub const fn new(capacitance: CapacitanceValue, kind: CapacitorKind) -> Self
Creates a capacitor spec from capacitance and kind.
Sourcepub const fn capacitance(&self) -> CapacitanceValue
pub const fn capacitance(&self) -> CapacitanceValue
Returns the capacitance value.
Sourcepub fn kind(&self) -> CapacitorKind
pub fn kind(&self) -> CapacitorKind
Returns the capacitor kind.
Sourcepub const fn polarity(&self) -> CapacitorPolarity
pub const fn polarity(&self) -> CapacitorPolarity
Returns the capacitor polarity.
Sourcepub const fn voltage_rating(&self) -> Option<VoltageRating>
pub const fn voltage_rating(&self) -> Option<VoltageRating>
Returns the optional voltage rating.
Sourcepub const fn with_polarity(self, polarity: CapacitorPolarity) -> Self
pub const fn with_polarity(self, polarity: CapacitorPolarity) -> Self
Returns this spec with polarity attached.
Sourcepub const fn with_voltage_rating(self, voltage_rating: VoltageRating) -> Self
pub const fn with_voltage_rating(self, voltage_rating: VoltageRating) -> Self
Returns this spec with a voltage rating attached.
Trait Implementations§
Source§impl Clone for CapacitorSpec
impl Clone for CapacitorSpec
Source§fn clone(&self) -> CapacitorSpec
fn clone(&self) -> CapacitorSpec
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 CapacitorSpec
impl Debug for CapacitorSpec
Source§impl PartialEq for CapacitorSpec
impl PartialEq for CapacitorSpec
Source§fn eq(&self, other: &CapacitorSpec) -> bool
fn eq(&self, other: &CapacitorSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CapacitorSpec
Auto Trait Implementations§
impl Freeze for CapacitorSpec
impl RefUnwindSafe for CapacitorSpec
impl Send for CapacitorSpec
impl Sync for CapacitorSpec
impl Unpin for CapacitorSpec
impl UnsafeUnpin for CapacitorSpec
impl UnwindSafe for CapacitorSpec
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