notify_types/
debouncer_full.rsuse std::ops::{Deref, DerefMut};
use instant::Instant;
use crate::event::Event;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DebouncedEvent {
pub event: Event,
pub time: Instant,
}
impl DebouncedEvent {
pub fn new(event: Event, time: Instant) -> Self {
Self { event, time }
}
}
impl Deref for DebouncedEvent {
type Target = Event;
fn deref(&self) -> &Self::Target {
&self.event
}
}
impl DerefMut for DebouncedEvent {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.event
}
}