We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
HookArgument::new
1 parent 20cd6f1 commit d85a8ecCopy full SHA for d85a8ec
1 file changed
src/hook.rs
@@ -8,6 +8,12 @@ pub struct HookArgument<'a, Size> {
8
pub size: Size,
9
}
10
11
+impl<'a, Size> HookArgument<'a, Size> {
12
+ pub(crate) fn new(path: &'a Path, stats: &'a Metadata, size: Size) -> Self {
13
+ HookArgument { path, stats, size }
14
+ }
15
+}
16
+
17
/// Hook to run with a [`Path`] and its corresponding [`Metadata`] and size.
18
pub trait Hook<Size> {
19
fn run_hook(&self, argument: HookArgument<Size>);
0 commit comments