scir::netlist

Trait ConvertibleNetlister

Source
pub trait ConvertibleNetlister<S: Schema + ?Sized> {
    type Error: From<Error>;
    type Options<'a>;

    // Required method
    fn write_scir_netlist<W: Write>(
        &self,
        lib: &Library<S>,
        out: &mut W,
        opts: Self::Options<'_>,
    ) -> Result<NetlistLibConversion, Self::Error>;

    // Provided method
    fn write_scir_netlist_to_file(
        &self,
        lib: &Library<S>,
        path: impl AsRef<Path>,
        opts: Self::Options<'_>,
    ) -> Result<NetlistLibConversion, Self::Error> { ... }
}
Expand description

A netlister that tracks how cells and instances are translated between SCIR and the output netlist format.

Required Associated Types§

Source

type Error: From<Error>

The error type returned when writing out a SCIR netlist.

Source

type Options<'a>

The netlist options type.

Many netlisters accept options, allowing the user to configure things like netlist indentation, naming conventions, etc. This is the type of the object that stores those options.

Required Methods§

Source

fn write_scir_netlist<W: Write>( &self, lib: &Library<S>, out: &mut W, opts: Self::Options<'_>, ) -> Result<NetlistLibConversion, Self::Error>

Writes a netlist of a SCIR library to the provided output stream.

Provided Methods§

Source

fn write_scir_netlist_to_file( &self, lib: &Library<S>, path: impl AsRef<Path>, opts: Self::Options<'_>, ) -> Result<NetlistLibConversion, Self::Error>

Writes a netlist of a SCIR library to a file at the given path.

The file and any parent directories will be created if necessary.

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.

Implementors§