There are possible more elegant solutions here where Bytes is generic over some type representing an invariant, but this is probably easier to understand, and vinezombie already has cognitive complexity problems.
vinezombie is slowly stabilizing. Please hold.
vinezombie
An abstracting IRCv3 client library in Rust.
vinezombie is an opinionated Rust library for writing IRCv3 utilities,
namely IRC clients, bots, and plugins for said clients and bots.
It is designed to provide thin abstractions over the underlying protocol
while allowing the mapping between them be highly-configurable at runtime.
The goal is to allow client logic to be written as agnostically as reasonably
possible to the quirks of whatever server is being connected to.
Optional Features
vinezombie aims to have minimal mandatory dependencies.
The default feature set is designed to be enough to write IRC bots,
and includes the following:
graveseed: Adds graveseed integrations, allowing it to be used for I/O and message handling.base64: Adds base64 encoding/decoding. Required for SASL.log: Enables utilities for logging usinglog.
The following optional features are also available:
whoami: Uses system acocunt info forcrate::init::Register::default().
License
vinezombie is licensed under the GNU GPL v3 (only).
Disclosing the source code of bots written using vinezombie to
end users over IRC is also strongly encouraged, but not required.
Discussion
The author somtimes rambles about code design in #vinezombie on Libera.Chat. A link to a webchat is available at the top by clicking the libera.chat badge.
<jess> why vinezombie lmao
<TheDaemoness> Because. Grapevines. Undead chat protocols.
<jess> oh my god