Struct dazeus::DaZeus [] [src]

pub struct DaZeus<'a, T> {
    // some fields omitted
}

The base DaZeus struct.

See the crate documentation for a more detailed instruction on how to get started with these DaZeus bindings.

Methods

impl<'a, T> DaZeus<'a, T> where T: Read + Write

fn new(conn: T) -> DaZeus<'a, T>

Create a new instance of DaZeus from the given connection.

fn listen(&self) -> Result<(), Error>

Loop wait for messages to receive in a blocking way.

fn subscribe<F>(&mut self, event: EventType, callback: F) -> (ListenerHandle, Response) where F: FnMut(Event, &DaZeusClient) + 'a

Subscribe to an event type and call the callback function every time such an event occurs.

fn subscribe_command<F>(&mut self, command: &str, callback: F) -> (ListenerHandle, Response) where F: FnMut(Event, &DaZeusClient) + 'a

Subscribe to a command and call the callback function every time such a command occurs.

Trait Implementations

impl<'a, T> DaZeusClient<'a> for DaZeus<'a, T> where T: Read + Write

fn try_send(&self, request: Request) -> Result<Response, Error>

fn send(&self, request: Request) -> Response

fn unsubscribe(&mut self, handle: ListenerHandle) -> Response

fn unsubscribe_all(&mut self, event: EventType) -> Response

fn has_any_subscription(&self, event: EventType) -> bool

fn networks(&self) -> Response

fn channels(&self, network: &str) -> Response

fn message(&self, network: &str, channel: &str, message: &str) -> Response

fn notice(&self, network: &str, channel: &str, message: &str) -> Response

fn ctcp(&self, network: &str, channel: &str, message: &str) -> Response

fn ctcp_reply(&self, network: &str, channel: &str, message: &str) -> Response

fn action(&self, network: &str, channel: &str, message: &str) -> Response

fn send_names(&self, network: &str, channel: &str) -> Response

fn send_whois(&self, network: &str, nick: &str) -> Response

fn join(&self, network: &str, channel: &str) -> Response

fn part(&self, network: &str, channel: &str) -> Response

fn nick(&self, network: &str) -> Response

fn handshake(&self, name: &str, version: &str, config: Option<&str>) -> Response

fn get_config(&self, name: &str, group: ConfigGroup) -> Response

fn get_highlight_char(&self) -> Response

fn get_property(&self, name: &str, scope: Scope) -> Response

fn set_property(&self, name: &str, value: &str, scope: Scope) -> Response

fn unset_property(&self, name: &str, scope: Scope) -> Response

fn get_property_keys(&self, prefix: &str, scope: Scope) -> Response

fn set_permission(&self, permission: &str, allow: bool, scope: Scope) -> Response

fn has_permission(&self, permission: &str, default: bool, scope: Scope) -> Response

fn unset_permission(&self, permission: &str, scope: Scope) -> Response

fn whois(&mut self, network: &str, nick: &str) -> Event

fn names(&mut self, network: &str, channel: &str) -> Event

fn reply(&self, event: &Event, message: &str, highlight: bool) -> Response

fn reply_with_notice(&self, event: &Event, message: &str) -> Response

fn reply_with_action(&self, event: &Event, message: &str) -> Response