pzzld-server 0.0.2

A production ready server optimized for WASM applications
Documentation
/*
    Appellation: cnf <module>
    Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # Configuration
//!
//! This module implements the configuration settings for the platform. It is composed of several
//! sub-modules that define the various settings that can be configured.
#[doc(inline)]
pub use self::{kinds::*, settings::*, types::*};

mod settings;

pub mod kinds {
    #[doc(inline)]
    pub use self::{network::*, scope::*, services::*, tracing::*};

    mod network;
    mod scope;
    mod services;
    mod tracing;
}

pub mod types {
    #[doc(inline)]
    pub use self::{environment::*, log_level::*, mode::*, netaddr::*};

    mod environment;
    mod log_level;
    mod mode;
    mod netaddr;
}

pub(crate) mod prelude {
    pub use super::kinds::*;
    pub use super::settings::*;
}

serde_display! {
    json::<Display>(
        Settings,
        TracingConfig,
        NetworkConfig,
        ServicesConfig
    )
}

/// [`Configurable`] trait for types that can be configured with another type, denoted by
/// [Configurable::Config].
pub trait Configurable {
    type Config;

    fn config(&self) -> &Self::Config;
}