[][src]Trait weechat::WeechatPlugin

pub trait WeechatPlugin: Sized {
    fn init(weechat: &Weechat, args: ArgsWeechat) -> Result<Self, ()>;
}

Weechat plugin trait.

Implement this trait over your struct to implement a Weechat plugin. The init method will get called when Weechat loads the plugin, while the Drop method will be called when Weechat unloads the plugin.

Required methods

fn init(weechat: &Weechat, args: ArgsWeechat) -> Result<Self, ()>

Initialize the plugin.

Arguments

  • weechat - A borrow to a Weechat object that will be valid during the duration of the init callback.

  • args - Arguments passed to the plugin when it is loaded.

Loading content...

Implementors

Loading content...