Struct notify_debouncer_mini::Config
source · 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 timout) 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§
source§impl PartialEq<Config> for Config
impl PartialEq<Config> for Config
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
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