Skip to main content

ModuleNew

Trait ModuleNew 

Source
pub trait ModuleNew<B: Backend> {
    type Config: Default = ();

    // Required methods
    fn new(n: u64) -> Self;
    fn new_with(n: u64, config: Self::Config) -> Self;
}
Expand description

Instantiate a new crate::layouts::Module.

Provided Associated Types§

Source

type Config: Default = ()

Backend-specific construction parameters; see HalModuleImpl::Config.

Required Methods§

Source

fn new(n: u64) -> Self

Source

fn new_with(n: u64, config: Self::Config) -> Self

Instantiates under an explicit configuration (device selection, …).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<B> ModuleNew<B> for Module<B>
where B: Backend + HalModuleImpl<B>,