Crate mythoji

Source
Expand description

A collection of all emojis that might be used in a fantasy text-based game.

§Examples

use mythoji::{Emoji, Gender, Person, Location, SkinTone};

let castle = Location::Castle;
assert_eq!(castle.to_string(), "🏰");

let female_elf = Emoji::Person(Person::Elf, SkinTone::Neutral, Gender::Female);
assert_eq!(female_elf.to_string(), "🧝‍♀️");

§Limitations

Not all terminals support all emoji combinations, and it’s non-trivial to detect support without additional crates. It’s recommended to try the examples, and be prepared to fall back to a less fancy representation if the specific emojis don’t work.

§Features

  • iter: Enables the EnumIter derive macro for all enums. Disabled by default.

Enums§

Creature
Emojis that can be used to represent a creature.
Emoji
A collection of all emojis that might be used in a fantasy text-based game.
Gender
Genders that can be used with certain emojis.
Item
Emojis that can be used to represent an item.
Location
Emojis that can be used to represent a location.
Person
Emojis that can be used with different genders and skin tones.
SkinTone
Skin tones that can be used with certain emojis.
Symbol
Emojis that can be used to represent a symbol.