Trait substrate::io::schematic::HardwareType
source · 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§
Required Methods§
sourcefn instantiate<'n>(&self, ids: &'n [Node]) -> (Self::Bundle, &'n [Node])
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§
sourcefn instantiate_top(&self, ids: &[Node]) -> Self::Bundle
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.