[][src]Trait message_plugins::Plugin

pub trait Plugin<T>: Sync + Send + 'static {
    fn handle_message(&mut self, message: Message<T>) -> Option<u8>;
}

In this architectures, plugins are purely slaves: they simply react to messages. Their only way of returning information by default is by returning Some(status) to signal that they wish to be dropped. If you want your plugin to be able to communicate back to your application after some of your messages, you should hand them a channel to do so through your message type.

Required methods

fn handle_message(&mut self, message: Message<T>) -> Option<u8>

Loading content...

Implementors

impl<T: 'static, B: AsMut<dyn Plugin<T>> + Sync + Send + 'static> Plugin<T> for B[src]

Loading content...