Circuit

Struct Circuit 

Source
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

Source

pub fn new() -> Self

Create a new empty circuit.

Source

pub fn createNet(&mut self) -> NetRef

Create a new unconnected net and return a reference to it.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.