[][src]Enum spice21::circuit::Comp

pub enum Comp {
    V(Vi),
    I(Ii),
    R(Ri),
    C(Ci),
    D(DiodeI),
    Mos(Mosi),
    Module(ModuleI),
}

Component Enum

Circuits are primarily composed of a vector of these. From and Into methods for each variant are generated by enum_dispatch macros.

Variants

V(Vi)
I(Ii)
R(Ri)
C(Ci)
Mos(Mosi)
Module(ModuleI)

Implementations

impl Comp[src]

pub fn vdc<S: Into<String>>(name: S, vdc: f64, p: NodeRef, n: NodeRef) -> Comp[src]

Replacement for deprecated original V enum variant

pub fn idc<S: Into<String>>(name: S, dc: f64, p: NodeRef, n: NodeRef) -> Comp[src]

pub fn r<S: Into<String>>(name: S, g: f64, p: NodeRef, n: NodeRef) -> Comp[src]

pub fn c<S: Into<String>>(name: S, c: f64, p: NodeRef, n: NodeRef) -> Comp[src]

pub fn from(c: CompProto) -> Self[src]

Convert from protobuf-generated classes

Trait Implementations

impl From<Ci> for Comp[src]

impl From<Diode> for Comp[src]

impl From<Ii> for Comp[src]

impl From<ModuleInstance> for Comp[src]

impl From<Mosi> for Comp[src]

impl From<Ri> for Comp[src]

impl From<Vi> for Comp[src]

impl TryInto<Ci> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Diode> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Ii> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<ModuleInstance> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Mosi> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Ri> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryInto<Vi> for Comp[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.