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
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.