Re-export notify event types

This commit is contained in:
Félix Saparelli 2021-12-07 00:50:33 +13:00
parent 41869af688
commit a3751519e8
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 10 additions and 2 deletions

View File

@ -14,10 +14,18 @@ use std::{
process::ExitStatus,
};
use notify::EventKind;
use filekind::FileEventKind;
use crate::signal::{process::SubSignal, source::MainSignal};
/// Re-export of the Notify file event types.
pub mod filekind {
pub use notify::event::{
AccessKind, AccessMode, CreateKind, DataChange, EventKind as FileEventKind, MetadataKind,
ModifyKind, RemoveKind, RenameMode,
};
}
/// An event, as far as watchexec cares about.
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct Event {
@ -42,7 +50,7 @@ pub enum Tag {
},
/// Kind of a filesystem event (create, remove, modify, etc).
FileEventKind(EventKind),
FileEventKind(FileEventKind),
/// The general source of the event.
Source(Source),