pub trait RuntimeTransform {
// Required method
fn hook_process<F>(&mut self, event: Event, emit_fn: F)
where F: FnMut(Event);
// Provided methods
fn hook_init<F>(&mut self, _emit_fn: F)
where F: FnMut(Event) { ... }
fn hook_shutdown<F>(&mut self, _emit_fn: F)
where F: FnMut(Event) { ... }
fn timer_handler<F>(&mut self, _timer: Timer, _emit_fn: F)
where F: FnMut(Event) { ... }
fn timers(&self) -> Vec<Timer> { ... }
fn transform(&mut self, output: &mut OutputBuffer, event: Event) { ... }
}
Expand description
A trait representing a runtime running user-defined code.
Required Methods§
sourcefn hook_process<F>(&mut self, event: Event, emit_fn: F)
fn hook_process<F>(&mut self, event: Event, emit_fn: F)
Call user-defined “process” hook.
Provided Methods§
sourcefn hook_shutdown<F>(&mut self, _emit_fn: F)
fn hook_shutdown<F>(&mut self, _emit_fn: F)
Call user-defined “shutdown” hook.
sourcefn timer_handler<F>(&mut self, _timer: Timer, _emit_fn: F)
fn timer_handler<F>(&mut self, _timer: Timer, _emit_fn: F)
Call user-defined timer handler.
fn transform(&mut self, output: &mut OutputBuffer, event: Event)
Object Safety§
This trait is not object safe.