Struct hexchat_plugin::EnsureValidContext [−][src]
pub struct EnsureValidContext<'a> { /* fields omitted */ }
A safety wrapper to ensure you're working with a valid context.
This mechanism attempts to reduce the likelihood of segfaults.
Methods
impl<'a> EnsureValidContext<'a>
[src]
impl<'a> EnsureValidContext<'a>
pub fn find_context(
&mut self,
servname: Option<&str>,
channel: Option<&str>
) -> Option<Context>
[src]
pub fn find_context(
&mut self,
servname: Option<&str>,
channel: Option<&str>
) -> Option<Context>
Finds an open context for the given servname and channel.
pub fn nickcmp(&mut self, nick1: &str, nick2: &str) -> Ordering
[src]
pub fn nickcmp(&mut self, nick1: &str, nick2: &str) -> Ordering
Compares two nicks based on the server's case mapping.
pub fn send_modes<'b, I: IntoIterator<Item = &'b str>>(
&mut self,
iter: I,
mpl: i32,
sign: char,
mode: char
)
[src]
pub fn send_modes<'b, I: IntoIterator<Item = &'b str>>(
&mut self,
iter: I,
mpl: i32,
sign: char,
mode: char
)
pub fn command(self, cmd: &str)
[src]
pub fn command(self, cmd: &str)
Executes a command.
pub fn emit_print(self)
[src]
pub fn emit_print(self)
pub fn emit_print_attrs(self)
[src]
pub fn emit_print_attrs(self)
pub fn get_context(&mut self) -> Context
[src]
pub fn get_context(&mut self) -> Context
pub fn set_context(&mut self, ctx: &Context) -> bool
[src]
pub fn set_context(&mut self, ctx: &Context) -> bool
Sets the current context.
Returns true
if the context is valid, false
otherwise.
pub fn print(&mut self, s: &str)
[src]
pub fn print(&mut self, s: &str)
Prints to the hexchat buffer.
pub fn hook_command<F>(
&mut self,
cmd: &str,
cb: F,
pri: i32,
help: Option<&str>
) -> CommandHookHandle where
F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + RefUnwindSafe,
[src]
pub fn hook_command<F>(
&mut self,
cmd: &str,
cb: F,
pri: i32,
help: Option<&str>
) -> CommandHookHandle where
F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + RefUnwindSafe,
Sets a command hook
pub fn hook_server<F>(&mut self, cmd: &str, cb: F, pri: i32) -> ServerHookHandle where
F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + RefUnwindSafe,
[src]
pub fn hook_server<F>(&mut self, cmd: &str, cb: F, pri: i32) -> ServerHookHandle where
F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + RefUnwindSafe,
Sets a server hook
pub fn hook_print<F>(&mut self, name: &str, cb: F, pri: i32) -> PrintHookHandle where
F: Fn(&mut PluginHandle, Word) -> Eat + 'static + RefUnwindSafe,
[src]
pub fn hook_print<F>(&mut self, name: &str, cb: F, pri: i32) -> PrintHookHandle where
F: Fn(&mut PluginHandle, Word) -> Eat + 'static + RefUnwindSafe,
Sets a print hook
pub fn hook_timer<F>(&mut self, timeout: i32, cb: F) -> TimerHookHandle where
F: Fn(&mut PluginHandle) -> bool + 'static + RefUnwindSafe,
[src]
pub fn hook_timer<F>(&mut self, timeout: i32, cb: F) -> TimerHookHandle where
F: Fn(&mut PluginHandle) -> bool + 'static + RefUnwindSafe,
Sets a timer hook
pub fn get_info(&mut self, id: &InfoId) -> Option<String>
[src]
pub fn get_info(&mut self, id: &InfoId) -> Option<String>
Auto Trait Implementations
impl<'a> !Send for EnsureValidContext<'a>
impl<'a> !Send for EnsureValidContext<'a>
impl<'a> !Sync for EnsureValidContext<'a>
impl<'a> !Sync for EnsureValidContext<'a>