pub struct EchoPlugin { /* private fields */ }Expand description
Example plugin implementation
Implementations§
Source§impl EchoPlugin
impl EchoPlugin
Trait Implementations§
Source§impl Default for EchoPlugin
impl Default for EchoPlugin
Source§impl Plugin for EchoPlugin
impl Plugin for EchoPlugin
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Get plugin description
Source§fn capabilities(&self) -> Vec<Capability>
fn capabilities(&self) -> Vec<Capability>
Get plugin capabilities
Source§fn process<'life0, 'async_trait>(
&'life0 self,
request: PluginRequest,
) -> Pin<Box<dyn Future<Output = Result<PluginResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
request: PluginRequest,
) -> Pin<Box<dyn Future<Output = Result<PluginResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a request
Source§fn initialize<'life0, 'async_trait>(
&'life0 mut self,
_config: PluginConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
_config: PluginConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the plugin
Source§fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown the plugin
Source§fn can_handle(&self, _message: &Message) -> bool
fn can_handle(&self, _message: &Message) -> bool
Check if the plugin can handle a message
Source§fn metadata(&self) -> PluginMetadata
fn metadata(&self) -> PluginMetadata
Get plugin metadata
Auto Trait Implementations§
impl Freeze for EchoPlugin
impl RefUnwindSafe for EchoPlugin
impl Send for EchoPlugin
impl Sync for EchoPlugin
impl Unpin for EchoPlugin
impl UnwindSafe for EchoPlugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more