Skip to main content

AutoBuilder

Trait AutoBuilder 

Source
pub trait AutoBuilder: ModuleMeta {
    type Capability: Clone + 'static;
    type Error: Error + Send + 'static;

    // Required method
    fn build(kit: &Kit) -> Result<Self::Capability, Self::Error>;
}
Expand description

Builder trait for module construction.

Implemented by the user for each module.

Required Associated Types§

Source

type Capability: Clone + 'static

The capability type this module provides. Must be Clone.

Source

type Error: Error + Send + 'static

The error type returned on build failure.

Required Methods§

Source

fn build(kit: &Kit) -> Result<Self::Capability, Self::Error>

Build the module’s capability using the provided Kit.

§Errors

Returns Self::Error if the module fails to build.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§