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 to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more