pub trait HardwareType: FlatLen + HasNameTree + Clone {
    type Bundle: IsBundle;

    // Required method
    fn instantiate<'n>(&self, ids: &'n [Node]) -> (Self::Bundle, &'n [Node]);

    // Provided method
    fn instantiate_top(&self, ids: &[Node]) -> Self::Bundle { ... }
}
Expand description

A schematic hardware type.

Required Associated Types§

source

type Bundle: IsBundle

The Rust type representing schematic instances of this hardware type.

Required Methods§

source

fn instantiate<'n>(&self, ids: &'n [Node]) -> (Self::Bundle, &'n [Node])

Instantiates a schematic data struct with populated nodes.

Must consume exactly FlatLen::len elements of the node list.

Provided Methods§

source

fn instantiate_top(&self, ids: &[Node]) -> Self::Bundle

Instantiate a top-level schematic data struct from a node list

This method wraps instantiate with sanity checks to ensure that the instantiation process consumed all the nodes provided.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl HardwareType for ()

§

type Bundle = ()

source§

fn instantiate<'n>(&self, ids: &'n [Node]) -> (Self::Bundle, &'n [Node])

Implementors§