filament-core · config
Source declarations, signatures and documentation for config.
Read the current implementation boundaries before integration. This reference reproduces declarations; it omits source comments whose examples or readiness claims have not been verified.
Source: sigil/weave/filament/filament-core/src/config.rs. SHA-256: 1d7c003f92ca8c3b5f5465562c3ef3ad4b1095c6877150e1a9692effabfd6bf6.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
config::Config
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Config {
/// Enable transport layer (routing and forwarding).
#[serde(default = "default_enable_transport")]
pub enable_transport: bool,
/// Share this instance with other processes via RPC.
#[serde(default = "default_share_instance")]
pub share_instance: bool,
/// Human-readable instance name.
#[serde(default = "default_instance_name")]
pub instance_name: String,
/// Configuration file path (for hot-reload).
#[serde(skip)]
pub config_path: Option<PathBuf>,
/// Network interfaces configuration.
#[serde(default)]
pub interfaces: Vec<InterfaceConfig>,
/// Logging configuration.
#[serde(default)]
pub logging: LogConfig,
/// Metrics configuration.
#[serde(default)]
pub metrics: MetricsConfig,
/// Shutdown configuration.
#[serde(default)]
pub shutdown: ShutdownConfig
}Source line: 23.
config::Config::from_file
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>;Source line: 86.
config::Config::from_toml_str
pub fn from_toml_str(s: &str) -> Result<Self>;Source line: 105.
config::Config::save
pub fn save<P: AsRef<Path>>(&self, path: P) -> Result<()>;Source line: 116.
config::Config::validate
pub fn validate(&self) -> Result<()>;Source line: 128.
config::Config::merge
pub fn merge(&mut self, other: &Self);Source line: 157.
config::InterfaceConfig
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InterfaceConfig {
/// Interface type (auto, tcp_server, tcp_client, udp, serial).
#[serde(rename = "type")]
pub interface_type: String,
/// Interface name (for identification).
pub name: String,
/// Operating mode.
#[serde(default = "default_interface_mode")]
pub mode: InterfaceMode,
/// Whether this interface is enabled.
#[serde(default = "default_enabled")]
pub enabled: bool,
/// Interface-specific configuration.
#[serde(flatten)]
pub config: serde_json::Value
}Source line: 173.
config::InterfaceConfig::validate
pub fn validate(&self) -> Result<()>;Source line: 196.
config::LogConfig
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LogConfig {
/// Log level (strand, debug, info, warn, error).
#[serde(default = "default_log_level")]
pub level: String,
/// Output format (text or json).
#[serde(default)]
pub json: bool
}Source line: 216.
config::MetricsConfig
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MetricsConfig {
/// Enable Prometheus metrics exposition.
#[serde(default = "default_metrics_enabled")]
pub enabled: bool,
/// Metrics HTTP server port.
#[serde(default = "default_metrics_port")]
pub port: u16,
/// Metrics HTTP server bind address.
#[serde(default = "default_metrics_bind")]
pub bind: String
}Source line: 237.
config::ShutdownConfig
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ShutdownConfig {
}Source line: 263.
config::ShutdownConfig::timeout
pub fn timeout(&self) -> Duration;Source line: 279.