[−][src]Crate weechat
weechat
This crate implements high level bindings for the Weechat plugin API.
The bindings make it possible to create powerful Weechat plugins using Rust.
use weechat::{ buffer::Buffer, plugin, Args, Weechat, Plugin, }; struct HelloWorld; impl Plugin for HelloWorld { fn init(_: &Weechat, _: Args) -> Result<Self, ()> { Weechat::print("Hello from Rust"); Ok(Self) } } impl Drop for HelloWorld { fn drop(&mut self) { Weechat::print("Bye from Rust"); } } plugin!( HelloWorld, name: "hello", author: "Damir Jelić <poljar@termina.org.uk>", description: "Simple hello world Rust plugin", version: "1.0.0", license: "MIT" );
Re-exports
pub use paste; |
pub use strum; |
pub use libc; |
pub use weechat_sys; |
Modules
buffer | Weechat Buffer module containing Buffer and Nick types. |
config | Weechat configuration for plugins. |
hooks | Weechat Hook module. |
infolist | Infolists can be used to share information between scripts and plugins. |
Macros
config | config_macro Declare a Weechat configuration file. |
plugin |
Structs
Args | An iterator over the arguments of a Weechat command, yielding a String value for each argument. |
Task | async |
Weechat | Main Weechat struct that encapsulates common weechat API functions. It has a similar API as the weechat script API. |
Enums
ReturnCode | Status values for Weechat callbacks |
Traits
Plugin | Weechat plugin trait. |