[−][src]Struct twitchchat::Writer
A thread-safe, clonable writer for the Twitch client
Methods
impl<W: Write> Writer<W>
[src]
pub fn host(&self, channel: &str) -> Result<(), Error>
[src]
pub fn unhost(&self) -> Result<(), Error>
[src]
pub fn marker(&self, comment: Option<&str>) -> Result<(), Error>
[src]
pub fn raid(&self, channel: &str) -> Result<(), Error>
[src]
pub fn unraid(&self) -> Result<(), Error>
[src]
pub fn color<C: Into<TwitchColor>>(&self, color: C) -> Result<(), Error>
[src]
pub fn disconnect(&self) -> Result<(), Error>
[src]
pub fn help(&self) -> Result<(), Error>
[src]
pub fn mods(&self) -> Result<(), Error>
[src]
pub fn vips(&self) -> Result<(), Error>
[src]
pub fn commercial(&self, length: Option<usize>) -> Result<(), Error>
[src]
pub fn ban(&self, username: &str, reason: Option<&str>) -> Result<(), Error>
[src]
pub fn unban(&self, username: &str) -> Result<(), Error>
[src]
pub fn clear(&self) -> Result<(), Error>
[src]
pub fn emoteonly(&self) -> Result<(), Error>
[src]
pub fn emoteonlyoff(&self) -> Result<(), Error>
[src]
pub fn followers(&self, duration: &str) -> Result<(), Error>
[src]
pub fn followersoff(&self) -> Result<(), Error>
[src]
pub fn op(&self, username: &str) -> Result<(), Error>
[src]
pub fn unmod(&self, username: &str) -> Result<(), Error>
[src]
pub fn r9kbeta(&self) -> Result<(), Error>
[src]
pub fn r9kbetaoff(&self) -> Result<(), Error>
[src]
pub fn slow(&self, duration: Option<usize>) -> Result<(), Error>
[src]
pub fn slowoff(&self) -> Result<(), Error>
[src]
pub fn subscribers(&self) -> Result<(), Error>
[src]
pub fn subscribersoff(&self) -> Result<(), Error>
[src]
pub fn timeout(
&self,
username: &str,
duration: Option<&str>,
reason: Option<&str>
) -> Result<(), Error>
[src]
&self,
username: &str,
duration: Option<&str>,
reason: Option<&str>
) -> Result<(), Error>
pub fn untimeout(&self, username: &str) -> Result<(), Error>
[src]
pub fn vip(&self, username: &str) -> Result<(), Error>
[src]
pub fn unvip(&self, username: &str) -> Result<(), Error>
[src]
pub fn whisper(&self, username: &str, message: &str) -> Result<(), Error>
[src]
pub fn join<C: Into<Channel>>(&self, channel: C) -> Result<(), Error>
[src]
Joins a channel
This ensures the channel name is lowercased and begins with a '#'.
The following are equivilant
let w = client.writer(); w.join("museun").unwrap(); w.join("#museun").unwrap(); w.join("Museun").unwrap(); w.join("#MUSEUN").unwrap();
pub fn part<C: Into<Channel>>(&self, channel: C) -> Result<(), Error>
[src]
Parts a channel
This ensures the channel name is lowercased and begins with a '#'.
The following are equivilant
let w = client.writer(); w.part("museun").unwrap(); w.part("#museun").unwrap(); w.part("Museun").unwrap(); w.part("#MUSEUN").unwrap();
pub fn me<C, S>(&self, channel: C, message: S) -> Result<(), Error> where
C: Into<Channel>,
S: AsRef<str>,
[src]
C: Into<Channel>,
S: AsRef<str>,
Sends an "emote" message
in the third person to the channel
This ensures the channel name is lowercased and begins with a '#'.
pub fn privmsg<C, S>(&self, channel: C, message: S) -> Result<(), Error> where
C: Into<Channel>,
S: AsRef<str>,
[src]
C: Into<Channel>,
S: AsRef<str>,
Sends the message
to the channel
This ensures the channel name is lowercased and begins with a '#'.
Same as send
pub fn send<C, S>(&self, channel: C, message: S) -> Result<(), Error> where
C: Into<Channel>,
S: AsRef<str>,
[src]
C: Into<Channel>,
S: AsRef<str>,
Sends the message
to the channel
This ensures the channel name is lowercased and begins with a '#'.
Same as privmsg
pub fn command<S>(&self, data: S) -> Result<(), Error> where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sends the command: data
(e.g. /color #FFFFFF
)
pub fn raw<S>(&self, data: S) -> Result<(), Error> where
S: AsRef<str>,
[src]
S: AsRef<str>,
Sends a raw line (appends the required \r\n
)
Trait Implementations
impl<W: Write> WriterExt for Writer<W>
[src]
fn join_many_limited<'a, I, S>(
&self,
channels: I,
rate: Option<RateLimit>
) -> Result<(), Error> where
I: IntoIterator<Item = S> + 'a,
S: AsRef<str> + 'a,
[src]
&self,
channels: I,
rate: Option<RateLimit>
) -> Result<(), Error> where
I: IntoIterator<Item = S> + 'a,
S: AsRef<str> + 'a,
fn join_many<'a, I, S>(&self, channels: I) -> Result<(), Error> where
I: IntoIterator<Item = S> + 'a,
S: AsRef<str> + 'a,
[src]
I: IntoIterator<Item = S> + 'a,
S: AsRef<str> + 'a,
impl<W: Write> Clone for Writer<W>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,