pub enum TuiError {
Show 24 variants
CatalogNotFound {
path: String,
},
CatalogParse {
path: String,
offset: usize,
detail: String,
},
TaintedEntry {
path: String,
offset: usize,
field: String,
},
WorkspaceNotFound {
start: String,
},
InvalidWorkspace {
path: String,
missing: String,
},
RegistryParse {
path: String,
detail: String,
},
RegistryDuplicate {
path: String,
entries: String,
},
RegistryFieldMissing {
entry: String,
field: String,
},
PolicyParse {
path: String,
line: Option<usize>,
detail: String,
},
PolicyInvalidRule {
rule: String,
reason: String,
},
GateCycle {
gates: String,
},
GateConfigParse {
path: String,
detail: String,
},
PersistenceOpen {
path: String,
detail: String,
},
PersistenceMigration {
from: u32,
to: u32,
detail: String,
},
PersistenceQuery {
detail: String,
},
AuditChainBroken {
entry_id: i64,
},
ConfigConflict {
detail: String,
},
ConfigInvalid {
flag: String,
detail: String,
},
SubprocessFailed {
command: String,
code: i32,
},
SubprocessTimeout {
command: String,
timeout_secs: u64,
},
ValidationRejected {
value: String,
rule: String,
},
PathTraversal {
path: String,
},
TerminalCapability {
capability: String,
},
LogDestination {
path: String,
reason: String,
},
}Expand description
Domain-specific errors with structured context.
All recoverable and non-recoverable errors the TUI can surface. Each variant includes structured context fields for precise error reporting.
Variants§
CatalogNotFound
CatalogParse
TaintedEntry
WorkspaceNotFound
InvalidWorkspace
RegistryParse
Workspace registry TOML failed to parse. path is the registry file;
line is the 1-based line number when available.
RegistryDuplicate
Two registry entries resolve to the same canonical workspace path.
entries is a human-readable description of the conflicting entries.
RegistryFieldMissing
A required field is absent from a workspace registry entry.
PolicyParse
Policy TOML failed to parse. line is the 1-based source line when available.
PolicyInvalidRule
A policy rule references a nonexistent asset, role, or uses an unsupported rule type.
GateCycle
Cycle detected while building the gate execution DAG.
gates is the comma-separated list of gate names forming the cycle.
GateConfigParse
The gates.toml (or equivalent) could not be parsed.
PersistenceOpen
SQLite database file could not be opened or created.
PersistenceMigration
Schema migration between two versions failed.
PersistenceQuery
A SQLite query or statement failed at runtime.
Mapped from rusqlite::Error via From.
AuditChainBroken
Audit log hash chain integrity check failed at the given entry ID.
ConfigConflict
Two or more CLI flags or config values are mutually exclusive.
ConfigInvalid
A specific CLI flag or config value is invalid.
SubprocessFailed
SubprocessTimeout
ValidationRejected
PathTraversal
TerminalCapability
LogDestination
Trait Implementations§
Source§impl Error for TuiError
impl Error for TuiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for TuiError
Maps a TOML deserialization error to ConfigInvalid.
impl From<Error> for TuiError
Maps a TOML deserialization error to ConfigInvalid.
We use ConfigInvalid rather than introducing a one-off TomlParse
variant because all TOML errors in this codebase surface as configuration
problems (registry, policy, gates), and the existing ConfigInvalid shape
(flag + detail) gives callers enough context to add the specific flag /
file name at the call site. This keeps the enum focused while remaining
ergonomic.
Auto Trait Implementations§
impl Freeze for TuiError
impl RefUnwindSafe for TuiError
impl Send for TuiError
impl Sync for TuiError
impl Unpin for TuiError
impl UnsafeUnpin for TuiError
impl UnwindSafe for TuiError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more