fedimint_core::config

Trait 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

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.

Implementors§