substrate::layout

Trait Layout

Source
pub trait Layout: Block {
    type Schema: Schema;
    type Bundle: LayoutBundle<Self::Schema> + HasBundleKind<BundleKind = IoKind<Self>>;
    type Data: LayoutData;

    // Required method
    fn layout(
        &self,
        cell: &mut CellBuilder<Self::Schema>,
    ) -> Result<(Self::Bundle, Self::Data)>;
}
Expand description

A block that can be laid out in a given layout Schema.

Required Associated Types§

Source

type Schema: Schema

The schema this layout is associated with.

Source

type Bundle: LayoutBundle<Self::Schema> + HasBundleKind<BundleKind = IoKind<Self>>

The bundle representing this block’s layout IO.

Source

type Data: LayoutData

Extra data to be shared with other blocks that instantiate this block’s layout.

Required Methods§

Source

fn layout( &self, cell: &mut CellBuilder<Self::Schema>, ) -> Result<(Self::Bundle, Self::Data)>

Generates the block’s layout.

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: Layout> Layout for Arc<T>

Source§

type Schema = <T as Layout>::Schema

Source§

type Bundle = <T as Layout>::Bundle

Source§

type Data = <T as Layout>::Data

Source§

fn layout( &self, cell: &mut CellBuilder<Self::Schema>, ) -> Result<(Self::Bundle, Self::Data)>

Implementors§