[][src]Crate twitchchat

This crate provides a way to interface with Twitch's chat.

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

Demonstration

See examples/demo.rs for a demo of the api

Re-exports

pub use client::Client;

Modules

clientfeature="async"

The client for reading/writing messages to Twitch

color

Color types associated with Twitch.

decode

Decode messages from a &str

eventsfeature="async"

Available event filters.

messages

Messages sent by the server

rate_limitfeature="async"

A simple leaky-bucket style token-based rate limiter This'll block the calling task if tokens aren't available

sync

Synchronous methods

twitch

Common Twitch types

Structs

Badge

Badges attached to a message

Channel

Simple channel wrapper.

Emotes

Emotes are little pictograms used in-line in Twitch messages

Encoder

An encoder for messages

Tags

Tags are IRCv3 message tags. Twitch uses them extensively.

UserConfig

User configuration for 'registering' with Twitch

UserConfigBuilder

Builder for making a UserConfig

Enums

BadgeKind

The kind of the badges that are associated with messages.

Capability

Capability used to enable extra functionality with the protocol

ChannelError

An error produced by invalid channel names

Secure

Connection type

UserConfigError

User config error returned by the UserConfigBuilder

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_WS_ADDRESS

The Twitch WebSocket address for non-TLS connections

TWITCH_WS_ADDRESS_TLS

The Twitch WebSocket address for TLS connections

Traits

AsOwned

Converts a type to an owned version

IntoChannel

A trait to convert types into Channel

Parse

A trait for parsing messages

Functions

connectfeature="async"

Opens an async TCP connection using the provided UserConfig and Secure setting

connect_easyfeature="async"

Opens an async TCP connection using the provided name, token and Secure setting

decode

Tries to decode potentially many messages from this input string

decode_one

Tries to decode one message, returning the amount of remaining data in the input

registerfeature="async"

Write the provided UserConfig to the async writer

Type Definitions

BadgeInfo

Metadata to the chat badges

BoxAsyncReadfeature="async"

Boxed AsyncRead

BoxAsyncWritefeature="async"

Boxed AsyncWrite