[−][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
client | feature="async" The client for reading/writing messages to Twitch |
color | Color types associated with Twitch. |
decode | Decode messages from a |
events | feature="async" Available event filters. |
messages | Messages sent by the server |
rate_limit | 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 |
Parse | A trait for parsing messages |
Functions
connect | feature="async" Opens an async TCP connection using the provided |
connect_easy | feature="async" Opens an async TCP connection using the provided |
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 |
register | feature="async" Write the provided |
Type Definitions
BadgeInfo | Metadata to the chat badges |
BoxAsyncRead | feature="async" Boxed AsyncRead |
BoxAsyncWrite | feature="async" Boxed AsyncWrite |