pub enum GriteError {
InvalidArgs(String),
NotFound(String),
Conflict(String),
DbBusy(String),
Io(Error),
Sled(Error),
Json(Error),
TomlParse(Error),
TomlSerialize(Error),
IdParse(IdParseError),
Internal(String),
Ipc(String),
}Expand description
Main error type for grit operations
Variants§
InvalidArgs(String)
NotFound(String)
Conflict(String)
DbBusy(String)
Io(Error)
Sled(Error)
Json(Error)
TomlParse(Error)
TomlSerialize(Error)
IdParse(IdParseError)
Internal(String)
Ipc(String)
Implementations§
Source§impl GriteError
impl GriteError
Sourcepub fn error_code(&self) -> &'static str
pub fn error_code(&self) -> &'static str
Get the error code for JSON output (from cli-json.md)
Sourcepub fn suggestions(&self) -> Vec<&'static str>
pub fn suggestions(&self) -> Vec<&'static str>
Get actionable suggestions for fixing the error
Sourcepub fn issue_not_found(issue_id: &str) -> Self
pub fn issue_not_found(issue_id: &str) -> Self
Create a NotFound error for an issue with helpful context
Sourcepub fn database_locked(details: Option<&str>) -> Self
pub fn database_locked(details: Option<&str>) -> Self
Create a DbBusy error with process info
Trait Implementations§
Source§impl Debug for GriteError
impl Debug for GriteError
Source§impl Display for GriteError
impl Display for GriteError
Source§impl Error for GriteError
impl Error for GriteError
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()
Source§impl From<Error> for GriteError
impl From<Error> for GriteError
Source§impl From<Error> for GriteError
impl From<Error> for GriteError
Source§impl From<Error> for GriteError
impl From<Error> for GriteError
Source§impl From<Error> for GriteError
impl From<Error> for GriteError
Source§impl From<Error> for GriteError
impl From<Error> for GriteError
Source§impl From<IdParseError> for GriteError
impl From<IdParseError> for GriteError
Source§fn from(source: IdParseError) -> Self
fn from(source: IdParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GriteError
impl !RefUnwindSafe for GriteError
impl Send for GriteError
impl Sync for GriteError
impl Unpin for GriteError
impl !UnwindSafe for GriteError
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