pub enum Primitive {
Res2 {
value: ComponentValue,
params: HashMap<UniCase<ArcStr>, ParamValue>,
},
Cap2 {
value: Decimal,
},
Diode2 {
model: ArcStr,
params: HashMap<UniCase<ArcStr>, ParamValue>,
},
Bjt {
model: ArcStr,
params: HashMap<UniCase<ArcStr>, ParamValue>,
has_substrate_port: bool,
},
Mos {
model: ArcStr,
params: HashMap<UniCase<ArcStr>, ParamValue>,
},
RawInstance {
ports: Vec<ArcStr>,
cell: ArcStr,
params: HashMap<UniCase<ArcStr>, ParamValue>,
},
RawInstanceWithCell {
ports: Vec<ArcStr>,
cell: ArcStr,
params: HashMap<UniCase<ArcStr>, ParamValue>,
body: ArcStr,
},
BlackboxInstance {
contents: BlackboxContents,
},
RawInstanceWithInclude {
cell: ArcStr,
netlist: PathBuf,
ports: Vec<ArcStr>,
},
}
Expand description
A SPICE primitive.
Variants§
Res2
A resistor primitive with ports “1” and “2” and value value
.
Fields
value: ComponentValue
The resistor value.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the resistor.
Cap2
A capacitor primitive with ports “1” and “2” and value value
.
Fields
value: Decimal
The capacitor value.
Diode2
A diode primitive with ports “1” and “2”.
Fields
model: ArcStr
The name of the diode model.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the diode.
Bjt
A BJT primitive with ports “NC”, “NB”, and “NE”.
Optionally has the port “NS”.
Fields
model: ArcStr
The name of the BJT model.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the BJT.
Mos
A MOS primitive with ports “D”, “G”, “S”, and “B”.
Fields
model: ArcStr
The name of the MOS model.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the MOS primitive.
RawInstance
A raw instance with an associated cell.
Fields
cell: ArcStr
The associated cell.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the raw instance.
RawInstanceWithCell
A raw instance with an associated cell.
Creates the corresponding SUBCKT with the given body.
Fields
cell: ArcStr
The associated cell.
params: HashMap<UniCase<ArcStr>, ParamValue>
Parameters associated with the raw instance.
body: ArcStr
The body of the associated cell.
BlackboxInstance
An instance with blackboxed contents.
Fields
contents: BlackboxContents
The contents of the cell.
RawInstanceWithInclude
A raw instance with an associated cell in a SPICE netlist.
Parameters are not supported.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request