Trait spice::netlist::HasSpiceLikeNetlist
source · pub trait HasSpiceLikeNetlist: Schema {
// Required methods
fn write_include<W: Write>(
&self,
out: &mut W,
include: &Include
) -> Result<()>;
fn write_start_subckt<W: Write>(
&self,
out: &mut W,
name: &ArcStr,
ports: &[&SignalInfo]
) -> Result<()>;
fn write_end_subckt<W: Write>(
&self,
out: &mut W,
name: &ArcStr
) -> Result<()>;
fn write_instance<W: Write>(
&self,
out: &mut W,
name: &ArcStr,
connections: Vec<ArcStr>,
child: &ArcStr
) -> Result<ArcStr>;
fn write_primitive_inst<W: Write>(
&self,
out: &mut W,
name: &ArcStr,
connections: HashMap<ArcStr, Vec<ArcStr>>,
primitive: &<Self as Schema>::Primitive
) -> Result<ArcStr>;
// Provided methods
fn write_prelude<W: Write>(
&self,
out: &mut W,
lib: &Library<Self>
) -> Result<()> { ... }
fn write_slice<W: Write>(
&self,
out: &mut W,
slice: Slice,
info: &SignalInfo
) -> Result<()> { ... }
fn write_postlude<W: Write>(
&self,
out: &mut W,
lib: &Library<Self>
) -> Result<()> { ... }
}
Expand description
A schema with a SPICE-like netlist format.
Required Methods§
sourcefn write_include<W: Write>(&self, out: &mut W, include: &Include) -> Result<()>
fn write_include<W: Write>(&self, out: &mut W, include: &Include) -> Result<()>
Writes an include statement.
A newline will be added afterward.
sourcefn write_start_subckt<W: Write>(
&self,
out: &mut W,
name: &ArcStr,
ports: &[&SignalInfo]
) -> Result<()>
fn write_start_subckt<W: Write>( &self, out: &mut W, name: &ArcStr, ports: &[&SignalInfo] ) -> Result<()>
Writes a begin subcircuit statement.
A newline will be added afterward.
sourcefn write_end_subckt<W: Write>(&self, out: &mut W, name: &ArcStr) -> Result<()>
fn write_end_subckt<W: Write>(&self, out: &mut W, name: &ArcStr) -> Result<()>
Writes an end subcircuit statement.
A newline will be added afterward.
Provided Methods§
sourcefn write_prelude<W: Write>(
&self,
out: &mut W,
lib: &Library<Self>
) -> Result<()>
fn write_prelude<W: Write>( &self, out: &mut W, lib: &Library<Self> ) -> Result<()>
Writes a prelude to the beginning of the output stream.
Should include a newline after if needed.
sourcefn write_slice<W: Write>(
&self,
out: &mut W,
slice: Slice,
info: &SignalInfo
) -> Result<()>
fn write_slice<W: Write>( &self, out: &mut W, slice: Slice, info: &SignalInfo ) -> Result<()>
Writes a slice.
Should not include a newline at the end.
Object Safety§
This trait is not object safe.