pub trait PluginMessage {
// Required method
fn send_message_to_frontend(
&self,
content: &str,
plugin_ctx: &PluginInstanceContext,
) -> bool;
}
Expand description
插件消息发送器 提供向前端发送消息的便捷方法,使用上下文传递模式
Required Methods§
Sourcefn send_message_to_frontend(
&self,
content: &str,
plugin_ctx: &PluginInstanceContext,
) -> bool
fn send_message_to_frontend( &self, content: &str, plugin_ctx: &PluginInstanceContext, ) -> bool
向前端发送消息,需要传入插件实例上下文