Trait Instance

Source
pub trait Instance:
    ToIOMacro<Output = Self>
    + Sized
    + 'static {
    type Params: ItfcParams;

Show 14 methods // Required methods fn type_name() -> &'static str; fn from_itfc(module: ModuleMold, params: Self::Params) -> Self; fn as_instance(&mut self, views: &mut InstanceViewIter); fn as_nested_itfc_io( &self, name: String, views: &mut InstanceViewIter, ) -> Self; fn make_nested_methods( &self, name: String, __cmt_gen: ContextItfc<impl Itfc>, ); fn module_mut(&mut self) -> &mut ModuleMold; fn module(&self) -> &ModuleMold; fn nested_names(&self) -> Vec<String>; fn invoke( &self, name: &str, args: &[&Var], num_res: usize, span: Option<MySpan>, ) -> Vars; // Provided methods fn get_name(&self) -> &str { ... } fn set_name(&mut self, name: String) { ... } fn make_modules(&mut self) -> Vec<Module> { ... } fn add_generated_io_methods( &self, prefix_name: String, exist_ins: HashSet<String>, exist_outs: HashSet<String>, exist_meths: HashSet<String>, __cmt_gen: ContextItfc<impl Itfc>, ) { ... } fn to_cmtir(self) -> Circuit { ... }
}

Required Associated Types§

Source

type Params: ItfcParams

Required Methods§

Source

fn type_name() -> &'static str

Source

fn from_itfc(module: ModuleMold, params: Self::Params) -> Self

Source

fn as_instance(&mut self, views: &mut InstanceViewIter)

Source

fn as_nested_itfc_io(&self, name: String, views: &mut InstanceViewIter) -> Self

Source

fn make_nested_methods(&self, name: String, __cmt_gen: ContextItfc<impl Itfc>)

Source

fn module_mut(&mut self) -> &mut ModuleMold

Source

fn module(&self) -> &ModuleMold

Source

fn nested_names(&self) -> Vec<String>

Source

fn invoke( &self, name: &str, args: &[&Var], num_res: usize, span: Option<MySpan>, ) -> Vars

Provided Methods§

Source

fn get_name(&self) -> &str

Source

fn set_name(&mut self, name: String)

Source

fn make_modules(&mut self) -> Vec<Module>

Source

fn add_generated_io_methods( &self, prefix_name: String, exist_ins: HashSet<String>, exist_outs: HashSet<String>, exist_meths: HashSet<String>, __cmt_gen: ContextItfc<impl Itfc>, )

Source

fn to_cmtir(self) -> Circuit

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§

Source§

impl Instance for FIFO

Source§

type Params = FIFOParams

Source§

impl Instance for Mem1r1w2d

Source§

type Params = Mem1r1w2dParams

Source§

impl Instance for Mem1r1w2dxk

Source§

type Params = Mem1r1w2dxkParams

Source§

impl Instance for Mem1r1w

Source§

type Params = Mem1r1wParams

Source§

impl Instance for Mem1r1wxk

Source§

type Params = Mem1r1wxkParams

Source§

impl Instance for Memcrsw

Source§

type Params = MemcrswParams

Source§

impl Instance for Reg

Source§

type Params = RegParams

Source§

impl Instance for Integer

Source§

type Params = IntegerParams

Source§

impl Instance for GeneratedModule

Source§

type Params = GeneratedModuleParams

Source§

impl Instance for Wire

Source§

type Params = WireParams