[][src]Crate twitchchat

This crate provides a way to interface with Twitch's chat (via IRC).

Along with the messages as Rust types, it provides methods for sending messages.


For twitch types:


For the 'irc' types underneath it all:


For an event loop:


For just decoding messages:


For just encoding messages:


Modules

channel

Simple async/sync channels used in various parts of this crate.

commands

Provides Encodable commands.

connector

This module lets you choose which runtime you want to use.

decoder

Decoding utilities.

encoder

Encoding utilies

irc

IRC message parsing.

maybe_owned

This is a Cow like type used in this crate.

messages

Twitch messages that can be parsed from IrcMessage, or subscribed to from the Dispatcher

prelude

Prelude with common types

rate_limit

A simple leaky-bucket style token-based rate limiter

runner

A set of runners for managing a event loop

twitch

Common Twitch types

writer

A set of writers

Structs

AsyncDecoder

A decoder over futures::io::AsyncRead that produces IrcMessages

AsyncEncoder

An asynchronous encoder.

AsyncRunner

An asynchronous runner

Decoder

A decoder over std::io::Read that produces IrcMessages

Encoder

A synchronous encoder

IrcMessage

A raw irc message @tags :prefix COMMAND args :data\r\n

UserConfig

User configuration for 'registering' with Twitch

Enums

DecodeError

An error produced by a Decoder.

MessageError

An invalid message was either provided, or could not be parsed

RunnerError

An error Returned by a Runner

Status

Status produced by the loop

Constants

ANONYMOUS_LOGIN

An anonymous login.

TWITCH_IRC_ADDRESS

The Twitch IRC address for non-TLS connections

TWITCH_IRC_ADDRESS_TLS

The Twitch IRC address for TLS connections

TWITCH_TLS_DOMAIN

A TLS domain for Twitch

TWITCH_WS_ADDRESS

The Twitch WebSocket address for non-TLS connections

TWITCH_WS_ADDRESS_TLS

The Twitch WebSocket address for TLS connections

Traits

Encodable

A trait to allow writing messags to any std::io::Write implementation

FromIrcMessage

A trait to convert an IrcMessage into Self.

IntoIrcMessage

A trait to convert a Self into an IrcMessage

IntoOwned

Converts a borrowed type into an owned type. e.g. 'a to 'static

PrivmsgExt

Extensions to the Privmsg message type

Validator

This trait is provided as an easy way of defining your own custom events.

Type Definitions

BoxedFuture

A boxed Future that is Send + Sync

Writer

An AsyncWriter over an MpscWriter