pub trait Plugin {
// Required methods
fn name(&self) -> &str;
fn enabled(&self) -> bool;
fn state(&self) -> Arc<RwLock<PluginState>>;
fn process_msg(&mut self, msg: &mut DltMessage) -> bool;
}Required Methods§
fn name(&self) -> &str
fn enabled(&self) -> bool
fn state(&self) -> Arc<RwLock<PluginState>>
Sourcefn process_msg(&mut self, msg: &mut DltMessage) -> bool
fn process_msg(&mut self, msg: &mut DltMessage) -> bool
process a single msg this can modify the msg (and is expected for most plugins)
a plugin can modify e.g.
- msg.timestamp_dms
- msg.reception_time_us
- payload: msg.set_payload_text(…)
returns false if the msg should be droppped (i.e. not forwarded) and true in all other cases