pub enum Mi6Error {
Storage(StorageError),
Config(ConfigError),
TtlParse(TtlParseError),
Init(InitError),
Transcript(TranscriptError),
Scan(ScanError),
}Expand description
Unified error type for all mi6-core operations.
This enum wraps all domain-specific error types, providing a single
error type that can be used throughout the library. Each variant
implements From for convenient ? operator usage.
§Example
ⓘ
use mi6_core::{Mi6Error, Config, Storage};
fn init_storage() -> Result<(), Mi6Error> {
let config = Config::load()?; // ConfigError -> Mi6Error
let db_path = config.db_path()?; // ConfigError -> Mi6Error
// ... storage operations would convert StorageError -> Mi6Error
Ok(())
}Variants§
Storage(StorageError)
Storage/database operation errors
Config(ConfigError)
Configuration loading errors
TtlParse(TtlParseError)
TTL/retention parsing errors
Init(InitError)
Hook installation/initialization errors
Transcript(TranscriptError)
Transcript parsing errors
Scan(ScanError)
Transcript scanning errors
Trait Implementations§
Source§impl Error for Mi6Error
impl Error for Mi6Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConfigError> for Mi6Error
impl From<ConfigError> for Mi6Error
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for Mi6Error
impl From<StorageError> for Mi6Error
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Source§impl From<TranscriptError> for Mi6Error
impl From<TranscriptError> for Mi6Error
Source§fn from(source: TranscriptError) -> Self
fn from(source: TranscriptError) -> Self
Converts to this type from the input type.
Source§impl From<TtlParseError> for Mi6Error
impl From<TtlParseError> for Mi6Error
Source§fn from(source: TtlParseError) -> Self
fn from(source: TtlParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Mi6Error
impl !RefUnwindSafe for Mi6Error
impl Send for Mi6Error
impl Sync for Mi6Error
impl Unpin for Mi6Error
impl !UnwindSafe for Mi6Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more