Skip to main content

EventFilterFn

Trait EventFilterFn 

Source
pub trait EventFilterFn: Send + Sync {
    // Required method
    fn matches(&self, event: &dyn TracerEvent) -> bool;
}
Expand description

Trait for filtering tracer events

Implement this trait to create custom event filters. This trait is used instead of raw closure types to avoid type complexity warnings.

Required Methods§

Source

fn matches(&self, event: &dyn TracerEvent) -> bool

Test whether an event passes the filter

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> EventFilterFn for F
where F: Fn(&dyn TracerEvent) -> bool + Send + Sync,

Implement EventFilterFn for any function that matches the signature