pub trait Plugin: Send + Sync {
// Required methods
fn get_name(&self) -> String;
fn get_meta(&self) -> PluginMeta;
fn get_info(&self) -> PluginInfo;
// Provided methods
fn on_new_otx(&self, _otx: OpenTransaction) { ... }
fn on_new_intervel(&self, _interval: u64) { ... }
fn on_commit_otx(&self, _otxs: Vec<H256>) { ... }
}Required Methods§
fn get_name(&self) -> String
fn get_meta(&self) -> PluginMeta
fn get_info(&self) -> PluginInfo
Provided Methods§
fn on_new_otx(&self, _otx: OpenTransaction)
fn on_new_intervel(&self, _interval: u64)
fn on_commit_otx(&self, _otxs: Vec<H256>)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".