#[non_exhaustive]pub enum Error {
Show 20 variants
Sqlite(Error),
Git(Box<dyn Error + Send + Sync>),
Json(Error),
UnknownTargetType(String),
InvalidTarget(String),
InvalidKey(String),
UnknownValueType(String),
KeyNotFound {
key: String,
},
TypeMismatch {
key: String,
expected: String,
},
ValueNotFound(String),
IndexOutOfRange {
index: usize,
size: usize,
},
InvalidValue(String),
NotARepository,
ResolveError(String),
GitCommand(String),
NoRemotes,
RemoteNotFound(String),
InvalidFilterRule(String),
InvalidTreePath(String),
Other(String),
}Expand description
Typed error enum for all gmeta operations.
Covers database, git, parsing, and domain-specific errors. External consumers can match on variants to handle specific failure modes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sqlite(Error)
SQLite operation failed.
Git(Box<dyn Error + Send + Sync>)
Git operation failed.
Json(Error)
JSON serialization or deserialization failed.
UnknownTargetType(String)
Unknown target type string (e.g. not “commit”, “branch”, etc.).
InvalidTarget(String)
Target string could not be parsed (wrong format, too short, etc.).
InvalidKey(String)
Key validation failed (empty, reserved segment, invalid characters).
UnknownValueType(String)
Unknown value type string (not “string”, “list”, or “set”).
KeyNotFound
Metadata key does not exist for the given target.
TypeMismatch
Key exists but has a different value type than expected.
Fields
ValueNotFound(String)
A specific value was not found in a list or set.
IndexOutOfRange
Index is out of range for a list operation.
InvalidValue(String)
A value was malformed or invalid (JSON encoding, list entry format, etc.).
NotARepository
No git repository found in the current directory or any parent.
ResolveError(String)
Could not resolve a partial commit SHA or ref.
GitCommand(String)
A git subprocess command failed.
NoRemotes
No metadata remotes are configured.
RemoteNotFound(String)
The specified remote is not a metadata remote.
InvalidFilterRule(String)
A filter rule string could not be parsed.
InvalidTreePath(String)
A tree path could not be parsed or is structurally invalid.
Other(String)
Catch-all for errors that don’t fit other variants.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()