[−][src]Struct twitchchat::encode::AsyncEncoder
An async encoder for messages
Methods
impl<W: AsyncWrite> AsyncEncoder<W>
[src]
pub fn into_inner(self) -> W
[src]
feature="tokio"
only.Gets the inner writer out
pub fn inner_mut(&mut self) -> &mut W
[src]
feature="tokio"
only.Get a mutable borrow of the inner writer
pub fn inner(&self) -> &W
[src]
feature="tokio"
only.Get a borrow of the inner writer
pub fn new(writer: W) -> Self
[src]
feature="tokio"
only.Make a new encoder from this writer
pub fn with_rate_limiter(self, rate_limit: Arc<Mutex<RateLimit>>) -> Self
[src]
feature="tokio"
only.Compose this encoder with a shared rate limiter
impl<W: AsyncWrite + Unpin> AsyncEncoder<W>
[src]
pub async fn ban<'a, '_, '_>(
&'_ mut self,
username: &'_ str,
reason: impl Into<Option<&'a str>>
) -> Result<(), Error>
[src]
&'_ mut self,
username: &'_ str,
reason: impl Into<Option<&'a str>>
) -> Result<(), Error>
feature="tokio"
only.Permanently prevent a user from chatting. Reason is optional and will be shown to the target user and other moderators.
Use unban to remove a ban.
pub async fn clear<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Clear chat history for all users in this room.
pub async fn color<'_>(&'_ mut self, color: Color) -> Result<(), Error>
[src]
feature="tokio"
only.Change your username color.
pub async fn command<'_, '_>(&'_ mut self, data: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Sends the command: data (e.g. /color #FFFFFF)
pub async fn commercial<'_>(
&'_ mut self,
length: impl Into<Option<usize>>
) -> Result<(), Error>
[src]
&'_ mut self,
length: impl Into<Option<usize>>
) -> Result<(), Error>
feature="tokio"
only.Triggers a commercial.
Length (optional) must be a positive number of seconds.
pub async fn disconnect<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Reconnects to chat.
pub async fn emote_only<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Enables emote-only mode (only emoticons may be used in chat).
Use emote_only_off to disable.
pub async fn emote_only_off<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Disables emote-only mode.
pub async fn followers<'_, '_>(
&'_ mut self,
duration: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
duration: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Enables followers-only mode (only users who have followed for duration
may chat).
Examples: "30m"
, "1 week"
, "5 days 12 hours"
.
Must be less than 3 months.
pub async fn followers_off<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Disables followers-only mode.
pub async fn give_mod<'_, '_>(
&'_ mut self,
username: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
username: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Grant moderator status to a user.
Use mods to list the moderators of this channel.
pub async fn help<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Lists the commands available to you in this room.
pub async fn host<'_>(
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
[src]
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
feature="tokio"
only.Host another channel.
Use unhost to unset host mode.
pub async fn join<'_>(
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
[src]
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
feature="tokio"
only.Join a channel
pub async fn marker<'a, '_>(
&'_ mut self,
comment: impl Into<Option<&'a str>>
) -> Result<(), Error>
[src]
&'_ mut self,
comment: impl Into<Option<&'a str>>
) -> Result<(), Error>
feature="tokio"
only.Adds a stream marker (with an optional comment, max 140 characters) at the current timestamp.
You can use markers in the Highlighter for easier editing.
If the string exceeds 140 characters then it will be truncated
pub async fn me<'_, '_>(
&'_ mut self,
channel: impl IntoChannel,
message: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
channel: impl IntoChannel,
message: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Sends an "emote" message in the third person to the channel
pub async fn mods<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Lists the moderators of this channel.
pub async fn part<'_>(
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
[src]
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
feature="tokio"
only.Leave a channel
pub async fn ping<'_, '_>(&'_ mut self, token: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Request a heartbeat with the provided token
pub async fn pong<'_, '_>(&'_ mut self, token: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Response to a heartbeat with the provided token
pub async fn privmsg<'_, '_, '_>(
&'_ mut self,
target: &'_ str,
data: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
target: &'_ str,
data: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Send data to a target
pub async fn r9k_beta<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Enables r9k mode.
Use r9k_beta_off to disable.
pub async fn r9k_beta_off<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Disables r9k mode.
pub async fn raid<'_>(
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
[src]
&'_ mut self,
channel: impl IntoChannel
) -> Result<(), Error>
feature="tokio"
only.Raid another channel.
Use unraid to cancel the Raid.
pub async fn raw<'_>(&'_ mut self, raw: impl AsRef<[u8]>) -> Result<(), Error>
[src]
feature="tokio"
only.Send a raw IRC-style message
pub async fn slow<'_>(
&'_ mut self,
duration: impl Into<Option<usize>>
) -> Result<(), Error>
[src]
&'_ mut self,
duration: impl Into<Option<usize>>
) -> Result<(), Error>
feature="tokio"
only.Enables slow mode (limit how often users may send messages).
Duration (optional, default=120) must be a positive number of seconds.
Use slow_off to disable.
pub async fn slow_off<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Disables slow mode.
pub async fn subscribers<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Enables subscribers-only mode (only subscribers may chat in this channel).
Use subscribers_off to disable.
pub async fn subscribers_off<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Disables subscribers-only mode.
pub async fn timeout<'a, 'b, '_, '_>(
&'_ mut self,
username: &'_ str,
duration: impl Into<Option<&'a str>>,
message: impl Into<Option<&'b str>>
) -> Result<(), Error>
[src]
&'_ mut self,
username: &'_ str,
duration: impl Into<Option<&'a str>>,
message: impl Into<Option<&'b str>>
) -> Result<(), Error>
feature="tokio"
only.Temporarily prevent a user from chatting.
- duration (optional, default=
10 minutes
) must be a positive integer. - time unit (optional, default=
s
) must be one of- s
- m
- h
- d
- w
- maximum duration is
2 weeks
.
Combinations like 1d2h
are also allowed.
Reason is optional and will be shown to the target user and other moderators.
Use untimeout to remove a timeout.
pub async fn unban<'_, '_>(&'_ mut self, username: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Removes a ban on a user.
pub async fn unhost<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Stop hosting another channel.
pub async fn unmod<'_, '_>(&'_ mut self, username: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Revoke moderator status from a user.
Use mods to list the moderators of this channel.
pub async fn unraid<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Cancel the Raid.
pub async fn untimeout<'_, '_>(
&'_ mut self,
username: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
username: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Removes a timeout on a user.
pub async fn unvip<'_, '_>(&'_ mut self, username: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Revoke VIP status from a user.
Use vips to list the VIPs of this channel.
pub async fn vip<'_, '_>(&'_ mut self, username: &'_ str) -> Result<(), Error>
[src]
feature="tokio"
only.Grant VIP status to a user.
Use vips to list the VIPs of this channel.
pub async fn vips<'_>(&'_ mut self) -> Result<(), Error>
[src]
feature="tokio"
only.Lists the VIPs of this channel.
pub async fn whisper<'_, '_, '_>(
&'_ mut self,
username: &'_ str,
message: &'_ str
) -> Result<(), Error>
[src]
&'_ mut self,
username: &'_ str,
message: &'_ str
) -> Result<(), Error>
feature="tokio"
only.Whispers the message to the username.
Trait Implementations
impl<W: AsyncWrite + Clone> Clone for AsyncEncoder<W>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<W> Debug for AsyncEncoder<W>
[src]
impl<W: AsyncWrite + Default> Default for AsyncEncoder<W>
[src]
Auto Trait Implementations
impl<W> !RefUnwindSafe for AsyncEncoder<W>
impl<W> Send for AsyncEncoder<W> where
W: Send,
W: Send,
impl<W> Sync for AsyncEncoder<W> where
W: Sync,
W: Sync,
impl<W> Unpin for AsyncEncoder<W> where
W: Unpin,
W: Unpin,
impl<W> !UnwindSafe for AsyncEncoder<W>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,