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§
Sourcetype Local: DeserializeOwned + Serialize
type Local: DeserializeOwned + Serialize
Locally configurable parameters for config generation
Sourcetype Consensus: DeserializeOwned + Serialize
type Consensus: DeserializeOwned + Serialize
Consensus parameters for config generation
Required Methods§
Sourcefn from_parts(local: Self::Local, consensus: Self::Consensus) -> Self
fn from_parts(local: Self::Local, consensus: Self::Consensus) -> Self
Assemble from the 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.