[−][src]Struct twitchchat::AsyncRunner
An asynchronous runner
Fields
identity: Identity
You identity that Twitch gives when you connected
Implementations
impl AsyncRunner
[src]
pub async fn connect<C, '_>(
connector: C,
user_config: &'_ UserConfig
) -> Result<Self, Error> where
C: Connector,
&'a C::Output: AsyncRead + AsyncWrite + Send + Sync + Unpin,
[src]
connector: C,
user_config: &'_ UserConfig
) -> Result<Self, Error> where
C: Connector,
&'a C::Output: AsyncRead + AsyncWrite + Send + Sync + Unpin,
Connect with the provided connector and the provided UserConfig
This returns the Runner with your identity set.
pub fn is_on_channel(&self, channel: &str) -> bool
[src]
Check whether you're on this channel
pub fn get_channel_mut(&mut self, channel: &str) -> Option<&mut Channel>
[src]
Get a specific channel.
This is useful for changing the rate limit/state manually.
pub fn writer(&self) -> AsyncWriter<MpscWriter>ⓘNotable traits for AsyncWriter<W>
impl<W> Write for AsyncWriter<W> where
W: Write + Send + Sync,
[src]
Notable traits for AsyncWriter<W>
impl<W> Write for AsyncWriter<W> where
W: Write + Send + Sync,
Get a clonable writer you can use
pub fn quit_handle(&self) -> NotifyHandle
[src]
Get a handle that you can trigger a normal 'quit'.
You can also do AsyncWriter::quit
.
pub async fn join<'_, '_>(&'_ mut self, channel: &'_ str) -> Result<(), Error>
[src]
Join channel
and wait for it to complete
pub async fn part<'_, '_>(&'_ mut self, channel: &'_ str) -> Result<(), Error>
[src]
Part channel
and wait for it to complete
pub async fn next_message<'_>(&'_ mut self) -> Result<Status<'static>, Error>
[src]
Get the next message. You'll usually want to call this in a loop
pub async fn step<'_>(&'_ mut self) -> Result<StepResult<'static>, Error>
[src]
Single step the loop. This is useful for testing.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AsyncRunner
impl Send for AsyncRunner
impl Sync for AsyncRunner
impl Unpin for AsyncRunner
impl !UnwindSafe for AsyncRunner
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, 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>,