fedimint_core::config

Trait ModuleInitParams

Source
pub trait ModuleInitParams: Serialize + DeserializeOwned {
    type Local: DeserializeOwned + Serialize;
    type Consensus: DeserializeOwned + Serialize;

    // Required methods
    fn from_parts(local: Self::Local, consensus: Self::Consensus) -> Self;
    fn to_parts(self) -> (Self::Local, Self::Consensus);
}

Required Associated Types§

Source

type Local: DeserializeOwned + Serialize

Locally configurable parameters for config generation

Source

type Consensus: DeserializeOwned + Serialize

Consensus parameters for config generation

Required Methods§

Source

fn from_parts(local: Self::Local, consensus: Self::Consensus) -> Self

Assemble from the distinct parts

Source

fn to_parts(self) -> (Self::Local, Self::Consensus)

Split the config into its distinct parts

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.

Implementors§