pub trait TypedServerModuleConfig: DeserializeOwned + Serialize {
type Local: DeserializeOwned + Serialize;
type Private: DeserializeOwned + Serialize;
type Consensus: TypedServerModuleConsensusConfig;
// Required methods
fn from_parts(
local: Self::Local,
private: Self::Private,
consensus: Self::Consensus,
) -> Self;
fn to_parts(
self,
) -> (ModuleKind, Self::Local, Self::Private, Self::Consensus);
// Provided method
fn to_erased(self) -> ServerModuleConfig { ... }
}
Expand description
Module (server side) config, typed
Required Associated Types§
sourcetype Local: DeserializeOwned + Serialize
type Local: DeserializeOwned + Serialize
Local non-consensus, not security-sensitive settings
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(
local: Self::Local,
private: Self::Private,
consensus: Self::Consensus,
) -> Self
fn from_parts( local: Self::Local, private: Self::Private, consensus: Self::Consensus, ) -> Self
Assemble from the three functionally distinct parts
Provided Methods§
sourcefn to_erased(self) -> ServerModuleConfig
fn to_erased(self) -> ServerModuleConfig
Turn the typed config into type-erased version
Object Safety§
This trait is not object safe.