pub trait ServerConfig {
// Required method
fn config_name(&self) -> &'static str;
// Provided methods
fn validate(&self) -> Result<()> { ... }
fn is_enabled(&self) -> bool { ... }
}Expand description
Base configuration trait that all server configs must implement.
Required Methods§
Sourcefn config_name(&self) -> &'static str
fn config_name(&self) -> &'static str
Get configuration name for logging/debugging
Provided Methods§
Sourcefn validate(&self) -> Result<()>
fn validate(&self) -> Result<()>
Validate the configuration.
Implementors must override this method to perform meaningful validation.
The default returns Ok(()) only for backward compatibility with existing
implementors; new types should always provide a real check.
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if configuration is enabled