#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum LogdrainError {
#[error("invalid configuration: {0}")]
InvalidConfig(String),
#[error("regex compile failed: {0}")]
RegexCompile(#[from] regex::Error),
#[error("persistence: {0}")]
Persistence(#[from] crate::persistence::PersistenceError),
#[error("corrupt snapshot: bad magic")]
BadMagic,
#[error("snapshot version {found} not supported (max {max})")]
UnsupportedSnapshotVersion { found: u32, max: u32 },
#[error("corrupt snapshot: {0}")]
Decode(String),
}