pub struct NamedSupply {
pub name: String,
pub config: SupplyConfig,
}Expand description
A named power supply rail.
Allows circuits to have multiple supply voltages with different names
(e.g., V+, V-, B+ for bipolar supplies or tube circuits).
Fields§
§name: StringRail name (e.g., “vcc”, “V+”, “V-”, “B+”)
config: SupplyConfigSupply configuration (voltage and optional sag parameters)
Implementations§
Source§impl NamedSupply
impl NamedSupply
Sourcepub fn new(name: impl Into<String>, voltage: f64) -> Self
pub fn new(name: impl Into<String>, voltage: f64) -> Self
Create a named supply with just a voltage (no sag modeling).
Sourcepub fn with_config(name: impl Into<String>, config: SupplyConfig) -> Self
pub fn with_config(name: impl Into<String>, config: SupplyConfig) -> Self
Create a named supply with full configuration.
Trait Implementations§
Source§impl Clone for NamedSupply
impl Clone for NamedSupply
Source§fn clone(&self) -> NamedSupply
fn clone(&self) -> NamedSupply
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 NamedSupply
impl Debug for NamedSupply
Source§impl PartialEq for NamedSupply
impl PartialEq for NamedSupply
Source§fn eq(&self, other: &NamedSupply) -> bool
fn eq(&self, other: &NamedSupply) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NamedSupply
Auto Trait Implementations§
impl Freeze for NamedSupply
impl RefUnwindSafe for NamedSupply
impl Send for NamedSupply
impl Sync for NamedSupply
impl Unpin for NamedSupply
impl UnsafeUnpin for NamedSupply
impl UnwindSafe for NamedSupply
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