Skip to main content

Module types

Module types 

Source
Expand description

Strongly-typed wrappers for IRC identifiers.

IRC nicks and channel names are both “just strings” on the wire, which makes them easy to mix up in function signatures and stored state. Nick and Channel are thin newtypes that keep the two distinct in the type system while still behaving like the string they wrap (they implement Display, From<&str>/From<String>, and compare directly against string slices).

Structs§

Channel
An IRC channel name, including its prefix (e.g. #rust).
Nick
An IRC nickname.

Enums§

Target
The destination of a message: either a Channel or a User (a private query, identified by Nick).