pub enum DevSweepError {
Show 32 variants
Io(Error),
PathNotFound(PathBuf),
PermissionDenied(PathBuf),
NotADirectory(PathBuf),
Scanner(String),
ScanInterrupted,
ScanTimeout(u64),
Plugin {
plugin: String,
message: String,
},
PluginNotFound(String),
PluginInitFailed(String),
Git(String),
UncommittedChanges(PathBuf),
NotAGitRepo(PathBuf),
Docker(String),
DockerNotAvailable,
DockerTimeout,
Trash(String),
RestoreConflict(String),
RestoreFailed(String, String),
CleanBlocked(String),
CleanFailed {
path: PathBuf,
reason: String,
},
PartialCleanFailure {
succeeded: usize,
failed: usize,
},
Config(String),
ConfigParse {
path: PathBuf,
reason: String,
},
InvalidPattern(String),
Tui(String),
TerminalNotSupported,
Json(Error),
TomlParse(Error),
TomlSerialize(Error),
Other(String),
WithContext {
context: String,
source: Box<DevSweepError>,
},
}Expand description
Main error type for DevSweep operations
Variants§
Io(Error)
PathNotFound(PathBuf)
PermissionDenied(PathBuf)
NotADirectory(PathBuf)
Scanner(String)
ScanInterrupted
ScanTimeout(u64)
Plugin
PluginNotFound(String)
PluginInitFailed(String)
Git(String)
UncommittedChanges(PathBuf)
NotAGitRepo(PathBuf)
Docker(String)
DockerNotAvailable
DockerTimeout
Trash(String)
RestoreConflict(String)
RestoreFailed(String, String)
CleanBlocked(String)
CleanFailed
PartialCleanFailure
Config(String)
ConfigParse
InvalidPattern(String)
Tui(String)
TerminalNotSupported
Json(Error)
TomlParse(Error)
TomlSerialize(Error)
Other(String)
WithContext
Implementations§
Source§impl DevSweepError
impl DevSweepError
Sourcepub fn plugin(plugin: impl Into<String>, message: impl Into<String>) -> Self
pub fn plugin(plugin: impl Into<String>, message: impl Into<String>) -> Self
Create a plugin error with plugin name and message
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Create an error with additional context
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable (operation can continue)
Sourcepub fn is_user_interrupt(&self) -> bool
pub fn is_user_interrupt(&self) -> bool
Check if this error is a user-caused interruption
Sourcepub fn suggested_action(&self) -> Option<&'static str>
pub fn suggested_action(&self) -> Option<&'static str>
Get a suggested action for the user
Trait Implementations§
Source§impl Debug for DevSweepError
impl Debug for DevSweepError
Source§impl Display for DevSweepError
impl Display for DevSweepError
Source§impl Error for DevSweepError
impl Error for DevSweepError
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 DevSweepError
impl From<Error> for DevSweepError
Source§impl From<Error> for DevSweepError
impl From<Error> for DevSweepError
Source§impl From<Error> for DevSweepError
impl From<Error> for DevSweepError
Auto Trait Implementations§
impl Freeze for DevSweepError
impl !RefUnwindSafe for DevSweepError
impl Send for DevSweepError
impl Sync for DevSweepError
impl Unpin for DevSweepError
impl !UnwindSafe for DevSweepError
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
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>
Converts
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>
Converts
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> Pointable for T
impl<T> Pointable for T
Source§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>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more