substrate::schematic

Trait Schematic

Source
pub trait Schematic: Block<Io: HasBundleKind<BundleKind: SchematicBundleKind>> {
    type Schema: Schema;
    type NestedData: NestedData;

    // Required method
    fn schematic(
        &self,
        io: &IoNodeBundle<Self>,
        cell: &mut CellBuilder<<Self as Schematic>::Schema>,
    ) -> Result<Self::NestedData>;
}
Expand description

A block that has a schematic.

Required Associated Types§

Source

type Schema: Schema

The schema this schematic is associated with.

Source

type NestedData: NestedData

Extra schematic data to be stored with the block’s generated cell.

When the block is instantiated, all contained data will be nested within that instance.

Required Methods§

Source

fn schematic( &self, io: &IoNodeBundle<Self>, cell: &mut CellBuilder<<Self as Schematic>::Schema>, ) -> Result<Self::NestedData>

Generates the block’s schematic.

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.

Implementations on Foreign Types§

Source§

impl<T: Schematic> Schematic for Arc<T>

Source§

type Schema = <T as Schematic>::Schema

Source§

type NestedData = <T as Schematic>::NestedData

Source§

fn schematic( &self, io: &IoNodeBundle<Self>, cell: &mut CellBuilder<<Self as Schematic>::Schema>, ) -> Result<Self::NestedData>

Implementors§