pub trait Plugin {
    type Message;
    type Event;
    fn message_sender(&self) -> MessageSender<Self::Message>;
fn subscribe_events(&self) -> Receiver<Self::Event>;
fn run(self) -> MessageLoop; }
Expand description

Message-driven plugin

Associated Types

The message type

The event type

Required methods

Endpoint for submitting messages

Returns an endpoint for sending request messages to the plugin.

Subscribe to plugin events

Returns an endpoint for receiving events published by the plugin.

Run the message loop

Implementors