pub enum Error {
Show 25 variants
Git {
message: String,
command: Vec<String>,
exit_code: i32,
stderr: String,
},
GitNotFound,
NotARepository {
path: Option<String>,
},
NotInitialized,
AdrNotFound {
id: String,
},
InvalidAdr {
message: String,
},
Yaml(Error),
Json(Error),
Io(Error),
Template(Error),
Config {
message: String,
},
Validation {
message: String,
},
ContentTooLarge {
size: usize,
max: usize,
},
FeatureNotAvailable {
feature: String,
},
InvalidStatus {
status: String,
valid: Vec<String>,
},
ParseError {
message: String,
},
TemplateError {
message: String,
},
TemplateNotFound {
name: String,
},
AiNotConfigured {
message: String,
},
InvalidProvider {
provider: String,
},
WikiError {
message: String,
},
ExportError {
message: String,
},
InvalidFormat {
format: String,
},
IoError {
message: String,
},
Other(String),
}Expand description
Errors that can occur in git-adr operations.
Variants§
Git
Git command execution failed.
Fields
GitNotFound
Git executable not found.
NotARepository
Not in a git repository.
NotInitialized
git-adr not initialized in this repository.
AdrNotFound
ADR not found.
InvalidAdr
Invalid ADR format.
Yaml(Error)
YAML parsing error.
Json(Error)
JSON parsing error.
Io(Error)
IO error.
Template(Error)
Template rendering error.
Config
Configuration error.
Validation
Validation error.
ContentTooLarge
Content too large.
FeatureNotAvailable
Feature not available.
InvalidStatus
Invalid status value.
ParseError
Parse error.
TemplateError
Template error.
TemplateNotFound
Template not found.
AiNotConfigured
AI not configured.
InvalidProvider
Invalid AI provider.
WikiError
Wiki error.
ExportError
Export error.
InvalidFormat
Invalid format.
IoError
IO error with context.
Other(String)
Generic error with message.
Implementations§
Source§impl Error
impl Error
Sourcepub fn git(
message: impl Into<String>,
command: Vec<String>,
exit_code: i32,
stderr: impl Into<String>,
) -> Self
pub fn git( message: impl Into<String>, command: Vec<String>, exit_code: i32, stderr: impl Into<String>, ) -> Self
Create a git error.
Sourcepub fn adr_not_found(id: impl Into<String>) -> Self
pub fn adr_not_found(id: impl Into<String>) -> Self
Create an ADR not found error.
Sourcepub fn invalid_adr(message: impl Into<String>) -> Self
pub fn invalid_adr(message: impl Into<String>) -> Self
Create an invalid ADR error.
Sourcepub fn validation(message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
Create a validation error.
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)>
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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