Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: 'static {
    // Required methods
    fn name(&mut self) -> String;
    fn description(&mut self) -> String;
    fn register_hooks(&mut self) -> Option<Vec<IrcEvent>>;
    fn register_bots(&mut self) -> Option<Vec<Bot>>;

    // Provided method
    unsafe fn get_type_id(&self) -> TypeId { ... }
}

Required Methods§

Source

fn name(&mut self) -> String

Source

fn description(&mut self) -> String

Source

fn register_hooks(&mut self) -> Option<Vec<IrcEvent>>

Source

fn register_bots(&mut self) -> Option<Vec<Bot>>

Provided Methods§

Source

unsafe fn get_type_id(&self) -> TypeId

Implementations§

Source§

impl dyn Plugin

Source

pub fn downcast_mut<T: Plugin>(&mut self) -> Option<&mut T>

Source

pub fn is<T: Plugin>(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§