filament-core · error
Source declarations, signatures and documentation for error.
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/error.rs. SHA-256: 8bd5fe93c2abe77172bc4f5735db43830b85d670cb1ebe954f96bed8f3d3cbc7.
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.
error::Result
pub type Result<T> = std::result::Result<T, Error>;Source line: 9.
error::Error
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// Configuration error
#[error("configuration error: {0}")]
Config(String),
/// I/O error
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
/// TOML parsing error
#[error("TOML parsing error: {0}")]
TomlParse(#[from] toml::de::Error),
/// TOML serialization error
#[error("TOML serialization error: {0}")]
TomlSerialize(#[from] toml::ser::Error),
/// JSON error
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
/// Instance already running
#[error("instance already running")]
InstanceAlreadyRunning,
/// Instance not running
#[error("instance not running")]
InstanceNotRunning,
/// Instance initialization failed
#[error("instance initialization failed: {0}")]
InstanceInit(String),
/// Shutdown error
#[error("shutdown error: {0}")]
Shutdown(String),
/// Timeout error
#[error("operation timed out after {0:?}")]
Timeout(std::time::Duration),
/// File watch error
#[error("file watch error: {0}")]
FileWatch(String),
/// Invalid instance mode
#[error("invalid instance mode: {0}")]
InvalidInstanceMode(String),
/// Metrics error
#[error("metrics error: {0}")]
Metrics(String),
/// Type conversion error
#[error("type conversion error: {0}")]
TypeConversion(String),
}Source line: 13.
error::Error::is_recoverable
pub fn is_recoverable(&self) -> bool;Source line: 73.
error::Error::code
pub fn code(&self) -> &'static str;Source line: 81.
error::ErrorContext
pub trait ErrorContext<T> {
/// Add context to an error.
fn context(self, msg: impl fmt::Display) -> Result<T>;
/// Add context to an error using a closure.
fn with_context<F>(self, f: F) -> Result<T>
where
F: FnOnce() -> String;
}Source line: 102.