pub trait Guest {
Show 16 methods
// Required methods
fn info() -> PluginInfo;
fn start();
fn stop();
fn on_event(event: Event);
fn pre_send(message: OutgoingMessage) -> SendDecision;
fn pre_edit(edit: OutgoingEdit) -> SendDecision;
fn message_accessories(message: Message) -> Vec<Element> ⓘ;
fn message_decorations(message: Message) -> Vec<Element> ⓘ;
fn message_popover_buttons(message: Message) -> Vec<PopoverButton> ⓘ;
fn chat_bar_buttons(context: ChatBarContext) -> Vec<ChatBarButton> ⓘ;
fn context_menu(target: MenuTarget) -> Vec<MenuItem> ⓘ;
fn profile_sections(context: ProfileContext) -> Vec<Element> ⓘ;
fn user_badges(context: ProfileContext) -> Vec<Badge> ⓘ;
fn member_decorations(context: MemberContext) -> Vec<Element> ⓘ;
fn server_list_elements() -> Vec<Element> ⓘ;
fn settings_panel() -> Option<Element>;
}Required Methods§
Sourcefn info() -> PluginInfo
fn info() -> PluginInfo
Describe the plugin. Called once when the plugin is loaded, before start.
Sourcefn on_event(event: Event)
fn on_event(event: Event)
Receive an event. See event-kind for which events need a subscription.
Sourcefn pre_send(message: OutgoingMessage) -> SendDecision
fn pre_send(message: OutgoingMessage) -> SendDecision
Inspect or change a message before it is sent.
Sourcefn pre_edit(edit: OutgoingEdit) -> SendDecision
fn pre_edit(edit: OutgoingEdit) -> SendDecision
Inspect or change an edit before it is saved.
Sourcefn message_accessories(message: Message) -> Vec<Element> ⓘ
fn message_accessories(message: Message) -> Vec<Element> ⓘ
Elements shown below a message’s content.
Sourcefn message_decorations(message: Message) -> Vec<Element> ⓘ
fn message_decorations(message: Message) -> Vec<Element> ⓘ
Elements shown next to a message author’s name.
Buttons added to a message’s hover toolbar.
Buttons added next to the message input.
Items added to a context menu.
Sourcefn profile_sections(context: ProfileContext) -> Vec<Element> ⓘ
fn profile_sections(context: ProfileContext) -> Vec<Element> ⓘ
Sections added to a user profile.
Sourcefn user_badges(context: ProfileContext) -> Vec<Badge> ⓘ
fn user_badges(context: ProfileContext) -> Vec<Badge> ⓘ
Badges added to a user profile.
Sourcefn member_decorations(context: MemberContext) -> Vec<Element> ⓘ
fn member_decorations(context: MemberContext) -> Vec<Element> ⓘ
Elements shown next to a user in the member list and DM list.
Sourcefn server_list_elements() -> Vec<Element> ⓘ
fn server_list_elements() -> Vec<Element> ⓘ
Elements added to the server list.
Sourcefn settings_panel() -> Option<Element>
fn settings_panel() -> Option<Element>
Custom settings UI shown below the plugin’s declared settings.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".