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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.