Enum circe::Command[][src]

pub enum Command {
    JOIN(String),
    MODE(StringOption<String>),
    OTHER(String),
    PING(String),
    PRIVMSG(StringString),
    // some variants omitted
}
Expand description

IRC commands

Variants

JOIN(String)

Joins a channel

client.write_command(Command::JOIN("#main".to_string()))?;

Tuple Fields of JOIN

0: String

Channel

Sets the mode of the user

client.write_command(Command::MODE("#main".to_string(), Some("+B".to_string())))?;

If the MODE is not given (e.g. None), then the client will send “MODE target”

Tuple Fields of MODE

0: String

Channel

1: Option<String>

Mode

OTHER(String)

Everything that is not a command

Tuple Fields of OTHER

0: String
PING(String)

Ping another user or the server

Tuple Fields of PING

0: String

target

PRIVMSG(StringString)

Sends a message in a channel

client.write_command(Command::PRIVMSG("#main".to_string(), "This is an example message".to_string()))?;

Tuple Fields of PRIVMSG

0: String

Channel

1: String

Message

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.