Struct text_utils::Emoji [−][src]
Expand description
A specific emoji.
This is the basic type for all emojis, whether obtained via any of the statics (as defined in
the grouped
and flat
module) or functions such as
parse_alias
.
Tho, some statics are declared as With
or WithNoDef
. These represent customizable
emojis (i.e. a set of similar emojis), and provide functions for customizations (such as
With::tone
, With::gender
, and With::hair
), which take an attribute to be customized
(such as Tone
, Gender
, or Hair
respectively) and will eventually yield an Emoji
.
Emoji
implements Display
to be directly printable (e.g. with println!
). This will simply
print the grapheme
(the Unicode sequence) of this emoji.
Additionally, this struct contains some meta data such as the explanatory
name
of the emoji.
let art = Emoji {
name: "artist palette",
since: Version(0,6), // E0.6
grapheme: "🎨",
};
assert_eq!(emojic::flat::ARTIST_PALETTE, art);
Fields
name: &'static str
The full name of this emoji, much like a short description.
since: Version
The Unicode Emoji version when this grapheme (i.e. emoji) was first introduced.
Notice, that since this stated version the recommended visuals may have changed or
additional variants might have been added related to this emoji. In that case, the
individual variants (which have their own Emoji
instance) may have a different version
than the ‘default’ variant, depending on when they were first added, respetively.
grapheme: &'static str
The Unicode codepoint sequence of this emoji. The actual/rendered emoji.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Emoji
impl UnwindSafe for Emoji
Blanket Implementations
Mutably borrows from an owned value. Read more