Enum async_circe::commands::Command[][src]

pub enum Command {
Show 15 variants ADMIN(String), AWAY(String), INVITE(StringString), JOIN(String), LIST(Option<String>, Option<String>), MODE(StringOption<String>), NAMES(StringOption<String>), NICK(String), OPER(StringString), OTHER(String), PART(String), PING(String), PRIVMSG(StringStringString), QUIT(String), TOPIC(StringOption<String>), // some variants omitted
}
Expand description

Commands that can be send or recived from an IRC server.

Variants

ADMIN(String)

Tuple Fields

0: String

Target

Request information about the admin of a given server.

client.admin("libera.chat").await?;

Errors

Returns IO errors from the TcpStream.

AWAY(String)

Tuple Fields

0: String

Message

Set the status of the client.

client.away("afk").await?;

INVITE(StringString)

Tuple Fields

0: String

User

1: String

Channel

Invite someone to a channel.

client.invite("liblemonirc", "#async-circe").await?;

JOIN(String)

Tuple Fields

0: String

Channel

Join a channel.

client.join("#chaos").await?;

LIST(Option<String>, Option<String>)

Tuple Fields

0: Option<String>

Channel

1: Option<String>

Server to foreward request to

List available channels on an IRC, or users in a channel.

client.list(None, None).await?;

MODE(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Mode

Set the mode for a user.

client.mode("test", Some("+B")).await?;

NAMES(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Server to foreward request to

Get all the people online in channels.

client.names("#chaos,#async-circe", None).await?;

NICK(String)

Tuple Fields

0: String

Nickname

Change your nickname on a server.

client.nick("Not async-circe").await?;

OPER(StringString)

Tuple Fields

0: String

Username

1: String

Password

Authentificate as an operator on a server.

client.oper("username", "password").await?;

OTHER(String)

Tuple Fields

0: String

Everything that is not a command

PART(String)

Tuple Fields

0: String

Target

Leave a channel.

client.part("#chaos").await?;

PING(String)

Tuple Fields

0: String

Tests the presence of a connection to a server.

client.ping("libera.chat", None).await?;

PRIVMSG(StringStringString)

Tuple Fields

0: String

Source Nickname

1: String

Channel

2: String

Message

Send a message to a channel.

client.privmsg("#chaos", "Hello").await?;

QUIT(String)

Tuple Fields

0: String

Leave message

Leave the IRC server you are connected to.

client.quit(None).await?;

TOPIC(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Topic

Get the topic of a channel.

Example

client.topic("#chaos", None).await?;

Set the topic of a channel.

Example

client.topic("#chaos", Some("main channel")).await?;

Errors

Returns IO errors from the TcpStream.

Implementations

Creates a Command from a &str. Currently only [PING] and [PRIVMSG] are supported.

Panics

This function will panic if the IRCd sends malformed messages. Please contact the maintainer of your IRCd if this happens.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more