pub struct Sender { /* private fields */ }
Expand description
Thread-safe sender that can be used with the client.
Implementations§
source§impl Sender
impl Sender
sourcepub fn send<M: Into<Message>>(&self, msg: M) -> Result<()>
pub fn send<M: Into<Message>>(&self, msg: M) -> Result<()>
Send a single message to the unbounded queue.
sourcepub fn send_mode<S, T>(&self, target: S, modes: &[Mode<T>]) -> Result<()>
pub fn send_mode<S, T>(&self, target: S, modes: &[Mode<T>]) -> Result<()>
Changes the modes for the specified target.
sourcepub fn send_join<S>(&self, chanlist: S) -> Result<()>where
S: Display,
pub fn send_join<S>(&self, chanlist: S) -> Result<()>where
S: Display,
Joins the specified channel or chanlist.
sourcepub fn send_join_with_keys<S1, S2>(
&self,
chanlist: S1,
keylist: S2
) -> Result<()>
pub fn send_join_with_keys<S1, S2>( &self, chanlist: S1, keylist: S2 ) -> Result<()>
Joins the specified channel or chanlist using the specified key or keylist.
sourcepub fn send_notice<S1, S2>(&self, target: S1, message: S2) -> Result<()>
pub fn send_notice<S1, S2>(&self, target: S1, message: S2) -> Result<()>
Sends a notice to the specified target.
sourcepub fn send_cap_ls(&self, version: NegotiationVersion) -> Result<()>
pub fn send_cap_ls(&self, version: NegotiationVersion) -> Result<()>
Sends a request for a list of server capabilities for a specific IRCv3 version.
sourcepub fn send_cap_req(&self, extensions: &[Capability]) -> Result<()>
pub fn send_cap_req(&self, extensions: &[Capability]) -> Result<()>
Sends an IRCv3 capabilities request for the specified extensions.
sourcepub fn send_sasl<S: Display>(&self, data: S) -> Result<()>
pub fn send_sasl<S: Display>(&self, data: S) -> Result<()>
Sends a SASL AUTHENTICATE message with the specified data.
sourcepub fn send_sasl_plain(&self) -> Result<()>
pub fn send_sasl_plain(&self) -> Result<()>
Sends a SASL AUTHENTICATE request to use the PLAIN mechanism.
sourcepub fn send_sasl_external(&self) -> Result<()>
pub fn send_sasl_external(&self) -> Result<()>
Sends a SASL AUTHENTICATE request to use the EXTERNAL mechanism.
sourcepub fn send_sasl_abort(&self) -> Result<()>
pub fn send_sasl_abort(&self) -> Result<()>
Sends a SASL AUTHENTICATE request to abort authentication.
sourcepub fn send_pong<S>(&self, msg: S) -> Result<()>where
S: Display,
pub fn send_pong<S>(&self, msg: S) -> Result<()>where
S: Display,
Sends a PONG with the specified message.
sourcepub fn send_part<S>(&self, chanlist: S) -> Result<()>where
S: Display,
pub fn send_part<S>(&self, chanlist: S) -> Result<()>where
S: Display,
Parts the specified channel or chanlist.
sourcepub fn send_oper<S1, S2>(&self, username: S1, password: S2) -> Result<()>
pub fn send_oper<S1, S2>(&self, username: S1, password: S2) -> Result<()>
Attempts to oper up using the specified username and password.
sourcepub fn send_privmsg<S1, S2>(&self, target: S1, message: S2) -> Result<()>
pub fn send_privmsg<S1, S2>(&self, target: S1, message: S2) -> Result<()>
Sends a message to the specified target. If the message contains IRC newlines (\r\n
), it
will automatically be split and sent as multiple separate PRIVMSG
s to the specified
target. If you absolutely must avoid this behavior, you can do
client.send(PRIVMSG(target, message))
directly.
sourcepub fn send_topic<S1, S2>(&self, channel: S1, topic: S2) -> Result<()>
pub fn send_topic<S1, S2>(&self, channel: S1, topic: S2) -> Result<()>
Sets the topic of a channel or requests the current one.
If topic
is an empty string, it won’t be included in the message.
sourcepub fn send_kill<S1, S2>(&self, target: S1, message: S2) -> Result<()>
pub fn send_kill<S1, S2>(&self, target: S1, message: S2) -> Result<()>
Kills the target with the provided message.
sourcepub fn send_kick<S1, S2, S3>(
&self,
chanlist: S1,
nicklist: S2,
message: S3
) -> Result<()>
pub fn send_kick<S1, S2, S3>( &self, chanlist: S1, nicklist: S2, message: S3 ) -> Result<()>
Kicks the listed nicknames from the listed channels with a comment.
If message
is an empty string, it won’t be included in the message.
sourcepub fn send_samode<S1, S2, S3>(
&self,
target: S1,
mode: S2,
modeparams: S3
) -> Result<()>
pub fn send_samode<S1, S2, S3>( &self, target: S1, mode: S2, modeparams: S3 ) -> Result<()>
Changes the mode of the target by force.
If modeparams
is an empty string, it won’t be included in the message.
sourcepub fn send_sanick<S1, S2>(&self, old_nick: S1, new_nick: S2) -> Result<()>
pub fn send_sanick<S1, S2>(&self, old_nick: S1, new_nick: S2) -> Result<()>
Forces a user to change from the old nickname to the new nickname.
sourcepub fn send_invite<S1, S2>(&self, nick: S1, chan: S2) -> Result<()>
pub fn send_invite<S1, S2>(&self, nick: S1, chan: S2) -> Result<()>
Invites a user to the specified channel.
sourcepub fn send_quit<S>(&self, msg: S) -> Result<()>where
S: Display,
pub fn send_quit<S>(&self, msg: S) -> Result<()>where
S: Display,
Quits the server entirely with a message.
This defaults to Powered by Rust.
if none is specified.
sourcepub fn send_ctcp<S1, S2>(&self, target: S1, msg: S2) -> Result<()>
pub fn send_ctcp<S1, S2>(&self, target: S1, msg: S2) -> Result<()>
Sends a CTCP-escaped message to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_action<S1, S2>(&self, target: S1, msg: S2) -> Result<()>
pub fn send_action<S1, S2>(&self, target: S1, msg: S2) -> Result<()>
Sends an action command to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_finger<S>(&self, target: S) -> Result<()>where
S: Display,
pub fn send_finger<S>(&self, target: S) -> Result<()>where
S: Display,
Sends a finger request to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_version<S>(&self, target: S) -> Result<()>where
S: Display,
pub fn send_version<S>(&self, target: S) -> Result<()>where
S: Display,
Sends a version request to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_source<S>(&self, target: S) -> Result<()>where
S: Display,
pub fn send_source<S>(&self, target: S) -> Result<()>where
S: Display,
Sends a source request to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_user_info<S>(&self, target: S) -> Result<()>where
S: Display,
pub fn send_user_info<S>(&self, target: S) -> Result<()>where
S: Display,
Sends a user info request to the specified target. This requires the CTCP feature to be enabled.
sourcepub fn send_ctcp_ping<S>(&self, target: S) -> Result<()>where
S: Display,
pub fn send_ctcp_ping<S>(&self, target: S) -> Result<()>where
S: Display,
Sends a finger request to the specified target. This requires the CTCP feature to be enabled.