Skip to main content

Events

Trait Events 

Source
pub trait Events: Send + Sync {
    // Required method
    fn emit(&self, event: &Event);
}
Expand description

Where an operation’s events go. Implemented for closures (|e: &Event| …).

Required Methods§

Source

fn emit(&self, event: &Event)

Receives one event.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Events for Recorder

Source§

impl<F: Fn(&Event) + Send + Sync> Events for F

Source§

impl<W: Write + Send> Events for JsonLines<W>