Expand description
Efficient parsing and storage of Discord image hashes.
In a simple implementation, Discord image hashes are stored in a
std::string::String. Using an ImageHash, only 17 bytes are required
to store a Discord hash.
ImageHash::parse is used to parse provided bytes, along with
std::convert::TryFrom, std::str::FromStr, and serde
implementations. The input is assumed to be only in ASCII format.
ImageHash::bytes and ImageHash::is_animated may be used to
deconstruct the hash and ImageHash::new may be used to reconstruct one.
Structs§
- Image
Hash - Efficient storage for Discord image hashes.
- Image
Hash Parse Error - Parsing an image hash into an efficient storage format via
ImageHash::parsefailed. - Nibbles
- Iterator over the nibbles of an image hash.
Enums§
- Image
Hash Parse Error Type - Type of
ImageHashParseErrorthat occurred.