pub struct EventFilter { /* private fields */ }Expand description
Event filter for selective event handling
Implementations§
Source§impl EventFilter
impl EventFilter
Sourcepub fn include_types(self, types: Vec<String>) -> Self
pub fn include_types(self, types: Vec<String>) -> Self
Only include specific event types
Sourcepub fn exclude_types(self, types: Vec<String>) -> Self
pub fn exclude_types(self, types: Vec<String>) -> Self
Exclude specific event types
Sourcepub fn include_modifications(self, include: bool) -> Self
pub fn include_modifications(self, include: bool) -> Self
Set whether to include modification events
Sourcepub fn include_cursor_events(self, include: bool) -> Self
pub fn include_cursor_events(self, include: bool) -> Self
Set whether to include cursor/selection events
Sourcepub fn matches(&self, event: &DocumentEvent) -> bool
pub fn matches(&self, event: &DocumentEvent) -> bool
Check if an event passes this filter
Trait Implementations§
Source§impl Clone for EventFilter
impl Clone for EventFilter
Source§fn clone(&self) -> EventFilter
fn clone(&self) -> EventFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventFilter
impl Debug for EventFilter
Auto Trait Implementations§
impl Freeze for EventFilter
impl RefUnwindSafe for EventFilter
impl Send for EventFilter
impl Sync for EventFilter
impl Unpin for EventFilter
impl UnwindSafe for EventFilter
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