pub trait TypedServerModuleConfig: DeserializeOwned + Serialize {
type Private: DeserializeOwned + Serialize;
type Consensus: TypedServerModuleConsensusConfig;
// Required methods
fn from_parts(private: Self::Private, consensus: Self::Consensus) -> Self;
fn to_parts(self) -> (ModuleKind, Self::Private, Self::Consensus);
// Provided method
fn to_erased(self) -> ServerModuleConfig { ... }
}
Expand description
Module (server side) config, typed
Required Associated Types§
Sourcetype Private: DeserializeOwned + Serialize
type Private: DeserializeOwned + Serialize
Private for this federation member data that are security sensitive and will be encrypted at rest
Sourcetype Consensus: TypedServerModuleConsensusConfig
type Consensus: TypedServerModuleConsensusConfig
Shared consensus-critical config
Required Methods§
Sourcefn from_parts(private: Self::Private, consensus: Self::Consensus) -> Self
fn from_parts(private: Self::Private, consensus: Self::Consensus) -> Self
Assemble from the three functionally distinct parts
Sourcefn to_parts(self) -> (ModuleKind, Self::Private, Self::Consensus)
fn to_parts(self) -> (ModuleKind, Self::Private, Self::Consensus)
Split the config into its two functionally distinct parts
Provided Methods§
Sourcefn to_erased(self) -> ServerModuleConfig
fn to_erased(self) -> ServerModuleConfig
Turn the typed config into type-erased version
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.