pub struct Circuit { /* private fields */ }Expand description
Electronic circuit, containing a number of connected basic components.
Each component is connected to a number of nets, which are directly connected regions of wire.
Implementations§
Source§impl Circuit
impl Circuit
Sourcepub fn createNet(&mut self) -> NetRef
pub fn createNet(&mut self) -> NetRef
Create a new unconnected net and return a reference to it.
Sourcepub fn createBasicComponent(
&mut self,
component: Box<dyn BasicComponent>,
nets: Vec<NetRef>,
) -> ComponentRef
pub fn createBasicComponent( &mut self, component: Box<dyn BasicComponent>, nets: Vec<NetRef>, ) -> ComponentRef
Create a new basic component and connect it to a list of nets.
This method is only provided to implement new basic components,
which should call it in their create() method.
Any circuit or compound component should use the corresponding create() methods
instead, to make sure that the correct number of nets is passed.
See BasicComponent for more information.
Sourcepub fn performTransientAnalysis(
&mut self,
duration: f64,
step: f64,
) -> Result<TransientResult, RspiceError>
pub fn performTransientAnalysis( &mut self, duration: f64, step: f64, ) -> Result<TransientResult, RspiceError>
Perform a transient simulation.
Will run steps of step seconds, up to duration seconds.
Auto Trait Implementations§
impl Freeze for Circuit
impl !RefUnwindSafe for Circuit
impl !Send for Circuit
impl !Sync for Circuit
impl Unpin for Circuit
impl !UnwindSafe for Circuit
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