Skip to main content

Guest

Trait Guest 

Source
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§

Source

fn info() -> PluginInfo

Describe the plugin. Called once when the plugin is loaded, before start.

Source

fn start()

Called when the plugin is enabled.

Source

fn stop()

Called when the plugin is disabled. Timers are cancelled automatically.

Source

fn on_event(event: Event)

Receive an event. See event-kind for which events need a subscription.

Source

fn pre_send(message: OutgoingMessage) -> SendDecision

Inspect or change a message before it is sent.

Source

fn pre_edit(edit: OutgoingEdit) -> SendDecision

Inspect or change an edit before it is saved.

Source

fn message_accessories(message: Message) -> Vec<Element> ⓘ

Elements shown below a message’s content.

Source

fn message_decorations(message: Message) -> Vec<Element> ⓘ

Elements shown next to a message author’s name.

Source

fn message_popover_buttons(message: Message) -> Vec<PopoverButton> ⓘ

Buttons added to a message’s hover toolbar.

Source

fn chat_bar_buttons(context: ChatBarContext) -> Vec<ChatBarButton> ⓘ

Buttons added next to the message input.

Source

fn context_menu(target: MenuTarget) -> Vec<MenuItem> ⓘ

Items added to a context menu.

Source

fn profile_sections(context: ProfileContext) -> Vec<Element> ⓘ

Sections added to a user profile.

Source

fn user_badges(context: ProfileContext) -> Vec<Badge> ⓘ

Badges added to a user profile.

Source

fn member_decorations(context: MemberContext) -> Vec<Element> ⓘ

Elements shown next to a user in the member list and DM list.

Source

fn server_list_elements() -> Vec<Element> ⓘ

Elements added to the server list.

Source

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".

Implementors§