pub struct Notify {
pub paths: Vec<String>,
pub rewrite: Option<Rewrite>,
pub recursive: Option<bool>,
pub backend: NotifyBackendType,
pub filters: Option<Vec<String>>,
pub excludes: Vec<String>,
pub timer: Timer,
}
Fields§
§paths: Vec<String>
Paths to monitor
rewrite: Option<Rewrite>
Rewrite path
recursive: Option<bool>
Recursive monitoring (default: true)
backend: NotifyBackendType
Backend to use
recommended
: Uses the recommended backend such asinotify
on Linux,FSEvents
on macOS, andReadDirectoryChangesW
on Windowspolling
: Uses a polling backend (useful for rclone/nfs/etc mounts), which will be extremely inefficient with a high number of files
filters: Option<Vec<String>>
Filter by regex
excludes: Vec<String>
Targets to exclude
timer: Timer
Timer
Implementations§
Source§impl Notify
impl Notify
pub fn send_event( &self, tx: UnboundedSender<(String, EventKind)>, path: Option<&PathBuf>, reason: EventKind, ) -> Result<()>
pub fn async_watcher( &self, ) -> Result<(NotifyBackend, UnboundedReceiver<Result<Event>>)>
pub async fn watcher( &self, tx: UnboundedSender<(String, EventKind)>, ) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Notify
impl<'de> Deserialize<'de> for Notify
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 Notify
impl RefUnwindSafe for Notify
impl Send for Notify
impl Sync for Notify
impl Unpin for Notify
impl UnwindSafe for Notify
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