glyde/flags
Bitfields Discord sends as a JSON number.
Flags(kind) is the raw bits tagged by the flag type that names them, so
a bit newer than this build survives a decode and a re-encode: an edit
sends every previously set bit back, and dropping one clears a setting
nobody touched. The bit table stays private to the model that owns it,
which is why the setters here take a bit rather than a flag.
set_bit and clear_bit are shared by every family, including the ones
Discord never lets a bot write. A family is meant to be edited only if its
model exposes a named-flag builder: message, channel and member do.
Types
Values
pub fn decoder() -> decode.Decoder(Flags(kind))
pub fn has_bit(flags: Flags(kind), bit: Int) -> Bool
True when any bit of bit is set. Pass a single bit from the owning
model’s table: a multi-bit mask answers “any”, not “all”.