Trait irc::client::server::Server [] [src]

pub trait Server {
    fn config(&self) -> &Config;
fn send<M: Into<Message>>(&self, message: M) -> Result<()>
    where
        Self: Sized
;
fn stream(&self) -> ServerStream;
fn list_channels(&self) -> Option<Vec<String>>;
fn list_users(&self, channel: &str) -> Option<Vec<User>>; fn for_each_incoming<F>(&self, f: F) -> Result<()>
    where
        F: FnMut(Message) -> ()
, { ... } }

An interface for interacting with an IRC server.

Required Methods

Gets the configuration being used with this Server.

Sends a Command to this Server.

Gets a stream of incoming messages from the Server. Note: The stream can only be gotten once. Subsequent attempts will panic.

Gets a list of currently joined channels. This will be none if tracking is not supported altogether (such as when the nochanlists feature is enabled).

Gets a list of Users in the specified channel. This will be none if the channel is not being tracked, or if tracking is not supported altogether. For best results, be sure to request multi-prefix support from the server.

Provided Methods

Blocks on the stream, running the given function on each incoming message as they arrive.

Implementors