BufferInstrumentation

Trait BufferInstrumentation 

Source
pub trait BufferInstrumentation<T: Bufferable>:
    Send
    + Sync
    + 'static {
    // Required method
    fn on_send(&self, item: &mut T);
}
Expand description

Hook for observing items as they are sent into a BufferSender.

Required Methods§

Source

fn on_send(&self, item: &mut T)

Called immediately before the item is emitted to the underlying buffer. The underlying type is stored in an Arc, so we cannot have &mut self.

Implementors§