pub enum Hook {
Show 13 variants
OnNavigate {
from: PathBuf,
to: PathBuf,
},
OnScanStart {
path: PathBuf,
},
OnScanComplete {
path: PathBuf,
total_files: u64,
total_dirs: u64,
total_size: u64,
},
OnScanError {
path: PathBuf,
error: String,
},
OnDeleteStart {
items: Vec<PathBuf>,
use_trash: bool,
},
OnDeleteComplete {
deleted: usize,
failed: usize,
bytes_freed: u64,
},
OnCopyComplete {
succeeded: usize,
failed: usize,
bytes_copied: u64,
},
OnMoveComplete {
succeeded: usize,
failed: usize,
},
OnRenameComplete {
source: PathBuf,
new_path: PathBuf,
},
OnDuplicatesFound {
group_count: usize,
wasted_bytes: u64,
},
OnAgeAnalysisComplete {
stale_dirs: usize,
files: u64,
average_age_secs: u64,
},
OnStartup,
OnShutdown,
}Expand description
Events that plugins can hook into.
Variants§
The explorer moved to another directory.
OnScanStart
A full scan started.
OnScanComplete
A full scan finished.
Fields
OnScanError
A full scan failed.
OnDeleteStart
A delete is about to start. Awaited; a plugin can veto it.
OnDeleteComplete
A delete finished.
Fields
OnCopyComplete
A copy finished.
Fields
OnMoveComplete
A move finished.
Fields
OnRenameComplete
A rename finished.
OnDuplicatesFound
Duplicate analysis finished.
Fields
OnAgeAnalysisComplete
Age analysis finished.
Fields
OnStartup
The explorer started.
OnShutdown
The explorer is about to quit; awaited briefly.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hook
impl<'de> Deserialize<'de> for Hook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Hook
impl RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnsafeUnpin for Hook
impl UnwindSafe for Hook
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more