pub struct Config { /* private fields */ }
Expand description
Config for debouncer-mini
use notify_debouncer_mini::Config;
let backend_config = notify::Config::default();
let config = Config::default().with_timeout(Duration::from_secs(1)).with_batch_mode(true)
.with_notify_config(backend_config);
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout
Timeout is the amount of time after which a debounced event is emitted or a continuous event is send, if there still are events incoming for the specific path.
Sourcepub fn with_batch_mode(self, batch_mode: bool) -> Self
pub fn with_batch_mode(self, batch_mode: bool) -> Self
Set batch mode
When batch_mode
is enabled, events may be delayed (at most 2x the specified timeout) and delivered with others.
If disabled, all events are delivered immediately when their debounce timeout is reached.
Sourcepub fn with_notify_config(self, notify_config: Config) -> Self
pub fn with_notify_config(self, notify_config: Config) -> Self
Set notify::Config
for the backend
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)