[][src]Struct hexchat_plugin::WordEol

pub struct WordEol<'a> { /* fields omitted */ }

Arguments passed to a hook, until the end of the line.

Examples

use hexchat_plugin::{PluginHandle, Word, WordEol, Eat};

fn cmd_foo(ph: &mut PluginHandle, arg: Word, arg_eol: WordEol) -> Eat {
    if arg.len() < 3 {
        ph.print("Not enough arguments");
    } else {
        ph.print(&format!("{} {} {}", arg[0], arg[1], arg_eol[2]));
    }
    hexchat_plugin::EAT_ALL
}

fn on_privmsg(ph: &mut PluginHandle, word: Word, word_eol: WordEol) -> Eat {
    if word_eol.len() > 0 && word[0].starts_with('@') {
        ph.print("We have message tags!?");
    }
    hexchat_plugin::EAT_NONE
}

Trait Implementations

impl<'a> Deref for WordEol<'a>[src]

type Target = [&'a str]

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> Send for WordEol<'a>

impl<'a> Sync for WordEol<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.