Trait verilization_compiler::lang::Language[][src]

pub trait Language {
    type OptionsBuilder;
    type Options;
    fn name() -> &'static str;
fn empty_options() -> Self::OptionsBuilder;
fn add_option(
        builder: &mut Self::OptionsBuilder,
        name: &str,
        value: OsString
    ) -> Result<(), GeneratorError>;
fn finalize_options(
        builder: Self::OptionsBuilder
    ) -> Result<Self::Options, GeneratorError>;
fn generate<Output: for<'output> OutputHandler<'output>>(
        model: &Verilization,
        options: Self::Options,
        output: &mut Output
    ) -> Result<(), GeneratorError>; }

Defines a language supported by Verilization.

Associated Types

type OptionsBuilder[src]

An intermediate step for the language options.

type Options[src]

Finalized options.

Loading content...

Required methods

fn name() -> &'static str[src]

Gets the name of the language.

fn empty_options() -> Self::OptionsBuilder[src]

Gets an option builder with no options set.

fn add_option(
    builder: &mut Self::OptionsBuilder,
    name: &str,
    value: OsString
) -> Result<(), GeneratorError>
[src]

Sets an option.

fn finalize_options(
    builder: Self::OptionsBuilder
) -> Result<Self::Options, GeneratorError>
[src]

Ensures that any required options have been set and finalizes the options.

fn generate<Output: for<'output> OutputHandler<'output>>(
    model: &Verilization,
    options: Self::Options,
    output: &mut Output
) -> Result<(), GeneratorError>
[src]

Generates serialization code for the language.

Loading content...

Implementors

Loading content...