pub enum TgaError {
DbError(Error),
ConfigError(String),
IoError(Error),
SerdeYamlError(Error),
SerdeJsonError(Error),
ValidationError(String),
NotFound(String),
MigrationError(String),
}Expand description
Top-level error type for all tga-core operations.
Variants intentionally cover the surface area of I/O, serialization,
database, migration, validation, and lookup failures. Add new variants
rather than overloading TgaError::ValidationError for unrelated
failure modes.
Variants§
DbError(Error)
A rusqlite/SQLite error occurred.
ConfigError(String)
Configuration is structurally valid but semantically wrong (e.g. missing required field, contradictory values).
IoError(Error)
An underlying std::io error (file not found, permission denied, etc.).
SerdeYamlError(Error)
YAML deserialization failure.
SerdeJsonError(Error)
JSON serialization/deserialization failure.
ValidationError(String)
A validation rule on otherwise well-formed data failed.
NotFound(String)
A requested entity was not found.
MigrationError(String)
A database migration failed to apply or could not be reconciled.
Trait Implementations§
Source§impl Error for TgaError
impl Error for TgaError
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()
Auto Trait Implementations§
impl Freeze for TgaError
impl !RefUnwindSafe for TgaError
impl Send for TgaError
impl Sync for TgaError
impl Unpin for TgaError
impl UnsafeUnpin for TgaError
impl !UnwindSafe for TgaError
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