pub enum ManaError {
UnitNotFound {
id: String,
},
InvalidId {
id: String,
reason: String,
},
CycleDetected {
details: String,
},
VerifyFailed {
reason: String,
},
ConfigError(String),
IndexError(String),
LockConflict(String),
ParseError {
path: PathBuf,
reason: String,
},
IoError(Error),
Internal(Error),
}Expand description
Typed error for mana-core’s public API surface.
Callers can match on variants to handle specific failure modes
(e.g., distinguishing “unit not found” from “file corrupt”).
Internal functions still use anyhow — this type lives at the API boundary.
Variants§
UnitNotFound
The requested unit ID does not exist.
InvalidId
The unit ID is syntactically invalid (empty, special chars, path traversal).
CycleDetected
Adding a dependency would create a cycle in the graph.
VerifyFailed
The verify command failed or timed out.
ConfigError(String)
Problem reading or validating config.yaml.
IndexError(String)
Problem building, loading, or saving the index.
LockConflict(String)
Could not acquire the index lock (another process may hold it).
ParseError
YAML/frontmatter deserialization failed.
IoError(Error)
Filesystem I/O failure.
Internal(Error)
Catch-all for internal errors that don’t fit a specific variant.
Preserves the original anyhow::Error for debugging.
Trait Implementations§
Source§impl Error for ManaError
impl Error for ManaError
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()