Trait fedimint_core::config::TypedServerModuleConfig

source ·
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§

source

type Local: DeserializeOwned + Serialize

Local non-consensus, not security-sensitive settings

source

type Private: DeserializeOwned + Serialize

Private for this federation member data that are security sensitive and will be encrypted at rest

source

type Consensus: TypedServerModuleConsensusConfig

Shared consensus-critical config

Required Methods§

source

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

Assemble from the three functionally distinct parts

source

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

Split the config into its three functionally distinct parts

Provided Methods§

source

fn to_erased(self) -> ServerModuleConfig

Turn the typed config into type-erased version

Object Safety§

This trait is not object safe.

Implementors§