mod constants {
pub const GRINNING_FACE: char = '😀';
pub const GRINNING_FACE_WITH_SMILING_EYES: char = '😁';
pub const FACE_WITH_TEARS_OF_JOY: char = '😂';
pub const SMILING_FACE_WITH_OPEN_MOUTH: char = '😃';
pub const SMILING_FACE_WITH_OPEN_MOUTH_AND_SMILING_EYES: char = '😄';
pub const SMILING_FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT: char = '😅';
pub const SMILING_FACE_WITH_OPEN_MOUTH_AND_TIGHTLY_DASH_CLOSED_EYES: char = '😆';
pub const SMILING_FACE_WITH_HALO: char = '😇';
pub const SMILING_FACE_WITH_HORNS: char = '😈';
pub const WINKING_FACE: char = '😉';
pub const SMILING_FACE_WITH_SMILING_EYES: char = '😊';
pub const FACE_SAVOURING_DELICIOUS_FOOD: char = '😋';
pub const RELIEVED_FACE: char = '😌';
pub const SMILING_FACE_WITH_HEART_DASH_SHAPED_EYES: char = '😍';
pub const SMILING_FACE_WITH_SUNGLASSES: char = '😎';
pub const SMIRKING_FACE: char = '😏';
pub const NEUTRAL_FACE: char = '😐';
pub const EXPRESSIONLESS_FACE: char = '😑';
pub const UNAMUSED_FACE: char = '😒';
pub const FACE_WITH_COLD_SWEAT: char = '😓';
pub const PENSIVE_FACE: char = '😔';
pub const CONFUSED_FACE: char = '😕';
pub const CONFOUNDED_FACE: char = '😖';
pub const KISSING_FACE: char = '😗';
pub const FACE_THROWING_A_KISS: char = '😘';
pub const KISSING_FACE_WITH_SMILING_EYES: char = '😙';
pub const KISSING_FACE_WITH_CLOSED_EYES: char = '😚';
pub const FACE_WITH_STUCK_DASH_OUT_TONGUE: char = '😛';
pub const FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_WINKING_EYE: char = '😜';
pub const FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_TIGHTLY_DASH_CLOSED_EYES: char = '😝';
pub const DISAPPOINTED_FACE: char = '😞';
pub const WORRIED_FACE: char = '😟';
pub const ANGRY_FACE: char = '😠';
pub const POUTING_FACE: char = '😡';
pub const CRYING_FACE: char = '😢';
pub const PERSEVERING_FACE: char = '😣';
pub const FACE_WITH_LOOK_OF_TRIUMPH: char = '😤';
pub const DISAPPOINTED_BUT_RELIEVED_FACE: char = '😥';
pub const FROWNING_FACE_WITH_OPEN_MOUTH: char = '😦';
pub const ANGUISHED_FACE: char = '😧';
pub const FEARFUL_FACE: char = '😨';
pub const WEARY_FACE: char = '😩';
pub const SLEEPY_FACE: char = '😪';
pub const TIRED_FACE: char = '😫';
pub const GRIMACING_FACE: char = '😬';
pub const LOUDLY_CRYING_FACE: char = '😭';
pub const FACE_WITH_OPEN_MOUTH: char = '😮';
pub const HUSHED_FACE: char = '😯';
pub const FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT: char = '😰';
pub const FACE_SCREAMING_IN_FEAR: char = '😱';
pub const ASTONISHED_FACE: char = '😲';
pub const FLUSHED_FACE: char = '😳';
pub const SLEEPING_FACE: char = '😴';
pub const DIZZY_FACE: char = '😵';
pub const FACE_WITHOUT_MOUTH: char = '😶';
pub const FACE_WITH_MEDICAL_MASK: char = '😷';
pub const GRINNING_CAT_FACE_WITH_SMILING_EYES: char = '😸';
pub const CAT_FACE_WITH_TEARS_OF_JOY: char = '😹';
pub const SMILING_CAT_FACE_WITH_OPEN_MOUTH: char = '😺';
pub const SMILING_CAT_FACE_WITH_HEART_DASH_SHAPED_EYES: char = '😻';
pub const CAT_FACE_WITH_WRY_SMILE: char = '😼';
pub const KISSING_CAT_FACE_WITH_CLOSED_EYES: char = '😽';
pub const POUTING_CAT_FACE: char = '😾';
pub const CRYING_CAT_FACE: char = '😿';
pub const WEARY_CAT_FACE: char = '🙀';
pub const SLIGHTLY_FROWNING_FACE: char = '🙁';
pub const SLIGHTLY_SMILING_FACE: char = '🙂';
pub const UPSIDE_DASH_DOWN_FACE: char = '🙃';
pub const FACE_WITH_ROLLING_EYES: char = '🙄';
pub const FACE_WITH_NO_GOOD_GESTURE: char = '🙅';
pub const FACE_WITH_OK_GESTURE: char = '🙆';
pub const PERSON_BOWING_DEEPLY: char = '🙇';
pub const SEE_DASH_NO_DASH_EVIL_MONKEY: char = '🙈';
pub const HEAR_DASH_NO_DASH_EVIL_MONKEY: char = '🙉';
pub const SPEAK_DASH_NO_DASH_EVIL_MONKEY: char = '🙊';
pub const HAPPY_PERSON_RAISING_ONE_HAND: char = '🙋';
pub const PERSON_RAISING_BOTH_HANDS_IN_CELEBRATION: char = '🙌';
pub const PERSON_FROWNING: char = '🙍';
pub const PERSON_WITH_POUTING_FACE: char = '🙎';
}
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum Emoticons {
GrinningFace,
GrinningFaceWithSmilingEyes,
FaceWithTearsOfJoy,
SmilingFaceWithOpenMouth,
SmilingFaceWithOpenMouthAndSmilingEyes,
SmilingFaceWithOpenMouthAndColdSweat,
SmilingFaceWithOpenMouthAndTightlyDashClosedEyes,
SmilingFaceWithHalo,
SmilingFaceWithHorns,
WinkingFace,
SmilingFaceWithSmilingEyes,
FaceSavouringDeliciousFood,
RelievedFace,
SmilingFaceWithHeartDashShapedEyes,
SmilingFaceWithSunglasses,
SmirkingFace,
NeutralFace,
ExpressionlessFace,
UnamusedFace,
FaceWithColdSweat,
PensiveFace,
ConfusedFace,
ConfoundedFace,
KissingFace,
FaceThrowingAKiss,
KissingFaceWithSmilingEyes,
KissingFaceWithClosedEyes,
FaceWithStuckDashOutTongue,
FaceWithStuckDashOutTongueAndWinkingEye,
FaceWithStuckDashOutTongueAndTightlyDashClosedEyes,
DisappointedFace,
WorriedFace,
AngryFace,
PoutingFace,
CryingFace,
PerseveringFace,
FaceWithLookOfTriumph,
DisappointedButRelievedFace,
FrowningFaceWithOpenMouth,
AnguishedFace,
FearfulFace,
WearyFace,
SleepyFace,
TiredFace,
GrimacingFace,
LoudlyCryingFace,
FaceWithOpenMouth,
HushedFace,
FaceWithOpenMouthAndColdSweat,
FaceScreamingInFear,
AstonishedFace,
FlushedFace,
SleepingFace,
DizzyFace,
FaceWithoutMouth,
FaceWithMedicalMask,
GrinningCatFaceWithSmilingEyes,
CatFaceWithTearsOfJoy,
SmilingCatFaceWithOpenMouth,
SmilingCatFaceWithHeartDashShapedEyes,
CatFaceWithWrySmile,
KissingCatFaceWithClosedEyes,
PoutingCatFace,
CryingCatFace,
WearyCatFace,
SlightlyFrowningFace,
SlightlySmilingFace,
UpsideDashDownFace,
FaceWithRollingEyes,
FaceWithNoGoodGesture,
FaceWithOkGesture,
PersonBowingDeeply,
SeeDashNoDashEvilMonkey,
HearDashNoDashEvilMonkey,
SpeakDashNoDashEvilMonkey,
HappyPersonRaisingOneHand,
PersonRaisingBothHandsInCelebration,
PersonFrowning,
PersonWithPoutingFace,
}
impl Into<char> for Emoticons {
fn into(self) -> char {
use constants::*;
match self {
Emoticons::GrinningFace => GRINNING_FACE,
Emoticons::GrinningFaceWithSmilingEyes => GRINNING_FACE_WITH_SMILING_EYES,
Emoticons::FaceWithTearsOfJoy => FACE_WITH_TEARS_OF_JOY,
Emoticons::SmilingFaceWithOpenMouth => SMILING_FACE_WITH_OPEN_MOUTH,
Emoticons::SmilingFaceWithOpenMouthAndSmilingEyes => SMILING_FACE_WITH_OPEN_MOUTH_AND_SMILING_EYES,
Emoticons::SmilingFaceWithOpenMouthAndColdSweat => SMILING_FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT,
Emoticons::SmilingFaceWithOpenMouthAndTightlyDashClosedEyes => SMILING_FACE_WITH_OPEN_MOUTH_AND_TIGHTLY_DASH_CLOSED_EYES,
Emoticons::SmilingFaceWithHalo => SMILING_FACE_WITH_HALO,
Emoticons::SmilingFaceWithHorns => SMILING_FACE_WITH_HORNS,
Emoticons::WinkingFace => WINKING_FACE,
Emoticons::SmilingFaceWithSmilingEyes => SMILING_FACE_WITH_SMILING_EYES,
Emoticons::FaceSavouringDeliciousFood => FACE_SAVOURING_DELICIOUS_FOOD,
Emoticons::RelievedFace => RELIEVED_FACE,
Emoticons::SmilingFaceWithHeartDashShapedEyes => SMILING_FACE_WITH_HEART_DASH_SHAPED_EYES,
Emoticons::SmilingFaceWithSunglasses => SMILING_FACE_WITH_SUNGLASSES,
Emoticons::SmirkingFace => SMIRKING_FACE,
Emoticons::NeutralFace => NEUTRAL_FACE,
Emoticons::ExpressionlessFace => EXPRESSIONLESS_FACE,
Emoticons::UnamusedFace => UNAMUSED_FACE,
Emoticons::FaceWithColdSweat => FACE_WITH_COLD_SWEAT,
Emoticons::PensiveFace => PENSIVE_FACE,
Emoticons::ConfusedFace => CONFUSED_FACE,
Emoticons::ConfoundedFace => CONFOUNDED_FACE,
Emoticons::KissingFace => KISSING_FACE,
Emoticons::FaceThrowingAKiss => FACE_THROWING_A_KISS,
Emoticons::KissingFaceWithSmilingEyes => KISSING_FACE_WITH_SMILING_EYES,
Emoticons::KissingFaceWithClosedEyes => KISSING_FACE_WITH_CLOSED_EYES,
Emoticons::FaceWithStuckDashOutTongue => FACE_WITH_STUCK_DASH_OUT_TONGUE,
Emoticons::FaceWithStuckDashOutTongueAndWinkingEye => FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_WINKING_EYE,
Emoticons::FaceWithStuckDashOutTongueAndTightlyDashClosedEyes => FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_TIGHTLY_DASH_CLOSED_EYES,
Emoticons::DisappointedFace => DISAPPOINTED_FACE,
Emoticons::WorriedFace => WORRIED_FACE,
Emoticons::AngryFace => ANGRY_FACE,
Emoticons::PoutingFace => POUTING_FACE,
Emoticons::CryingFace => CRYING_FACE,
Emoticons::PerseveringFace => PERSEVERING_FACE,
Emoticons::FaceWithLookOfTriumph => FACE_WITH_LOOK_OF_TRIUMPH,
Emoticons::DisappointedButRelievedFace => DISAPPOINTED_BUT_RELIEVED_FACE,
Emoticons::FrowningFaceWithOpenMouth => FROWNING_FACE_WITH_OPEN_MOUTH,
Emoticons::AnguishedFace => ANGUISHED_FACE,
Emoticons::FearfulFace => FEARFUL_FACE,
Emoticons::WearyFace => WEARY_FACE,
Emoticons::SleepyFace => SLEEPY_FACE,
Emoticons::TiredFace => TIRED_FACE,
Emoticons::GrimacingFace => GRIMACING_FACE,
Emoticons::LoudlyCryingFace => LOUDLY_CRYING_FACE,
Emoticons::FaceWithOpenMouth => FACE_WITH_OPEN_MOUTH,
Emoticons::HushedFace => HUSHED_FACE,
Emoticons::FaceWithOpenMouthAndColdSweat => FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT,
Emoticons::FaceScreamingInFear => FACE_SCREAMING_IN_FEAR,
Emoticons::AstonishedFace => ASTONISHED_FACE,
Emoticons::FlushedFace => FLUSHED_FACE,
Emoticons::SleepingFace => SLEEPING_FACE,
Emoticons::DizzyFace => DIZZY_FACE,
Emoticons::FaceWithoutMouth => FACE_WITHOUT_MOUTH,
Emoticons::FaceWithMedicalMask => FACE_WITH_MEDICAL_MASK,
Emoticons::GrinningCatFaceWithSmilingEyes => GRINNING_CAT_FACE_WITH_SMILING_EYES,
Emoticons::CatFaceWithTearsOfJoy => CAT_FACE_WITH_TEARS_OF_JOY,
Emoticons::SmilingCatFaceWithOpenMouth => SMILING_CAT_FACE_WITH_OPEN_MOUTH,
Emoticons::SmilingCatFaceWithHeartDashShapedEyes => SMILING_CAT_FACE_WITH_HEART_DASH_SHAPED_EYES,
Emoticons::CatFaceWithWrySmile => CAT_FACE_WITH_WRY_SMILE,
Emoticons::KissingCatFaceWithClosedEyes => KISSING_CAT_FACE_WITH_CLOSED_EYES,
Emoticons::PoutingCatFace => POUTING_CAT_FACE,
Emoticons::CryingCatFace => CRYING_CAT_FACE,
Emoticons::WearyCatFace => WEARY_CAT_FACE,
Emoticons::SlightlyFrowningFace => SLIGHTLY_FROWNING_FACE,
Emoticons::SlightlySmilingFace => SLIGHTLY_SMILING_FACE,
Emoticons::UpsideDashDownFace => UPSIDE_DASH_DOWN_FACE,
Emoticons::FaceWithRollingEyes => FACE_WITH_ROLLING_EYES,
Emoticons::FaceWithNoGoodGesture => FACE_WITH_NO_GOOD_GESTURE,
Emoticons::FaceWithOkGesture => FACE_WITH_OK_GESTURE,
Emoticons::PersonBowingDeeply => PERSON_BOWING_DEEPLY,
Emoticons::SeeDashNoDashEvilMonkey => SEE_DASH_NO_DASH_EVIL_MONKEY,
Emoticons::HearDashNoDashEvilMonkey => HEAR_DASH_NO_DASH_EVIL_MONKEY,
Emoticons::SpeakDashNoDashEvilMonkey => SPEAK_DASH_NO_DASH_EVIL_MONKEY,
Emoticons::HappyPersonRaisingOneHand => HAPPY_PERSON_RAISING_ONE_HAND,
Emoticons::PersonRaisingBothHandsInCelebration => PERSON_RAISING_BOTH_HANDS_IN_CELEBRATION,
Emoticons::PersonFrowning => PERSON_FROWNING,
Emoticons::PersonWithPoutingFace => PERSON_WITH_POUTING_FACE,
}
}
}
impl std::convert::TryFrom<char> for Emoticons {
type Error = ();
fn try_from(c: char) -> Result<Self, Self::Error> {
use constants::*;
match c {
GRINNING_FACE => Ok(Emoticons::GrinningFace),
GRINNING_FACE_WITH_SMILING_EYES => Ok(Emoticons::GrinningFaceWithSmilingEyes),
FACE_WITH_TEARS_OF_JOY => Ok(Emoticons::FaceWithTearsOfJoy),
SMILING_FACE_WITH_OPEN_MOUTH => Ok(Emoticons::SmilingFaceWithOpenMouth),
SMILING_FACE_WITH_OPEN_MOUTH_AND_SMILING_EYES => Ok(Emoticons::SmilingFaceWithOpenMouthAndSmilingEyes),
SMILING_FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT => Ok(Emoticons::SmilingFaceWithOpenMouthAndColdSweat),
SMILING_FACE_WITH_OPEN_MOUTH_AND_TIGHTLY_DASH_CLOSED_EYES => Ok(Emoticons::SmilingFaceWithOpenMouthAndTightlyDashClosedEyes),
SMILING_FACE_WITH_HALO => Ok(Emoticons::SmilingFaceWithHalo),
SMILING_FACE_WITH_HORNS => Ok(Emoticons::SmilingFaceWithHorns),
WINKING_FACE => Ok(Emoticons::WinkingFace),
SMILING_FACE_WITH_SMILING_EYES => Ok(Emoticons::SmilingFaceWithSmilingEyes),
FACE_SAVOURING_DELICIOUS_FOOD => Ok(Emoticons::FaceSavouringDeliciousFood),
RELIEVED_FACE => Ok(Emoticons::RelievedFace),
SMILING_FACE_WITH_HEART_DASH_SHAPED_EYES => Ok(Emoticons::SmilingFaceWithHeartDashShapedEyes),
SMILING_FACE_WITH_SUNGLASSES => Ok(Emoticons::SmilingFaceWithSunglasses),
SMIRKING_FACE => Ok(Emoticons::SmirkingFace),
NEUTRAL_FACE => Ok(Emoticons::NeutralFace),
EXPRESSIONLESS_FACE => Ok(Emoticons::ExpressionlessFace),
UNAMUSED_FACE => Ok(Emoticons::UnamusedFace),
FACE_WITH_COLD_SWEAT => Ok(Emoticons::FaceWithColdSweat),
PENSIVE_FACE => Ok(Emoticons::PensiveFace),
CONFUSED_FACE => Ok(Emoticons::ConfusedFace),
CONFOUNDED_FACE => Ok(Emoticons::ConfoundedFace),
KISSING_FACE => Ok(Emoticons::KissingFace),
FACE_THROWING_A_KISS => Ok(Emoticons::FaceThrowingAKiss),
KISSING_FACE_WITH_SMILING_EYES => Ok(Emoticons::KissingFaceWithSmilingEyes),
KISSING_FACE_WITH_CLOSED_EYES => Ok(Emoticons::KissingFaceWithClosedEyes),
FACE_WITH_STUCK_DASH_OUT_TONGUE => Ok(Emoticons::FaceWithStuckDashOutTongue),
FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_WINKING_EYE => Ok(Emoticons::FaceWithStuckDashOutTongueAndWinkingEye),
FACE_WITH_STUCK_DASH_OUT_TONGUE_AND_TIGHTLY_DASH_CLOSED_EYES => Ok(Emoticons::FaceWithStuckDashOutTongueAndTightlyDashClosedEyes),
DISAPPOINTED_FACE => Ok(Emoticons::DisappointedFace),
WORRIED_FACE => Ok(Emoticons::WorriedFace),
ANGRY_FACE => Ok(Emoticons::AngryFace),
POUTING_FACE => Ok(Emoticons::PoutingFace),
CRYING_FACE => Ok(Emoticons::CryingFace),
PERSEVERING_FACE => Ok(Emoticons::PerseveringFace),
FACE_WITH_LOOK_OF_TRIUMPH => Ok(Emoticons::FaceWithLookOfTriumph),
DISAPPOINTED_BUT_RELIEVED_FACE => Ok(Emoticons::DisappointedButRelievedFace),
FROWNING_FACE_WITH_OPEN_MOUTH => Ok(Emoticons::FrowningFaceWithOpenMouth),
ANGUISHED_FACE => Ok(Emoticons::AnguishedFace),
FEARFUL_FACE => Ok(Emoticons::FearfulFace),
WEARY_FACE => Ok(Emoticons::WearyFace),
SLEEPY_FACE => Ok(Emoticons::SleepyFace),
TIRED_FACE => Ok(Emoticons::TiredFace),
GRIMACING_FACE => Ok(Emoticons::GrimacingFace),
LOUDLY_CRYING_FACE => Ok(Emoticons::LoudlyCryingFace),
FACE_WITH_OPEN_MOUTH => Ok(Emoticons::FaceWithOpenMouth),
HUSHED_FACE => Ok(Emoticons::HushedFace),
FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT => Ok(Emoticons::FaceWithOpenMouthAndColdSweat),
FACE_SCREAMING_IN_FEAR => Ok(Emoticons::FaceScreamingInFear),
ASTONISHED_FACE => Ok(Emoticons::AstonishedFace),
FLUSHED_FACE => Ok(Emoticons::FlushedFace),
SLEEPING_FACE => Ok(Emoticons::SleepingFace),
DIZZY_FACE => Ok(Emoticons::DizzyFace),
FACE_WITHOUT_MOUTH => Ok(Emoticons::FaceWithoutMouth),
FACE_WITH_MEDICAL_MASK => Ok(Emoticons::FaceWithMedicalMask),
GRINNING_CAT_FACE_WITH_SMILING_EYES => Ok(Emoticons::GrinningCatFaceWithSmilingEyes),
CAT_FACE_WITH_TEARS_OF_JOY => Ok(Emoticons::CatFaceWithTearsOfJoy),
SMILING_CAT_FACE_WITH_OPEN_MOUTH => Ok(Emoticons::SmilingCatFaceWithOpenMouth),
SMILING_CAT_FACE_WITH_HEART_DASH_SHAPED_EYES => Ok(Emoticons::SmilingCatFaceWithHeartDashShapedEyes),
CAT_FACE_WITH_WRY_SMILE => Ok(Emoticons::CatFaceWithWrySmile),
KISSING_CAT_FACE_WITH_CLOSED_EYES => Ok(Emoticons::KissingCatFaceWithClosedEyes),
POUTING_CAT_FACE => Ok(Emoticons::PoutingCatFace),
CRYING_CAT_FACE => Ok(Emoticons::CryingCatFace),
WEARY_CAT_FACE => Ok(Emoticons::WearyCatFace),
SLIGHTLY_FROWNING_FACE => Ok(Emoticons::SlightlyFrowningFace),
SLIGHTLY_SMILING_FACE => Ok(Emoticons::SlightlySmilingFace),
UPSIDE_DASH_DOWN_FACE => Ok(Emoticons::UpsideDashDownFace),
FACE_WITH_ROLLING_EYES => Ok(Emoticons::FaceWithRollingEyes),
FACE_WITH_NO_GOOD_GESTURE => Ok(Emoticons::FaceWithNoGoodGesture),
FACE_WITH_OK_GESTURE => Ok(Emoticons::FaceWithOkGesture),
PERSON_BOWING_DEEPLY => Ok(Emoticons::PersonBowingDeeply),
SEE_DASH_NO_DASH_EVIL_MONKEY => Ok(Emoticons::SeeDashNoDashEvilMonkey),
HEAR_DASH_NO_DASH_EVIL_MONKEY => Ok(Emoticons::HearDashNoDashEvilMonkey),
SPEAK_DASH_NO_DASH_EVIL_MONKEY => Ok(Emoticons::SpeakDashNoDashEvilMonkey),
HAPPY_PERSON_RAISING_ONE_HAND => Ok(Emoticons::HappyPersonRaisingOneHand),
PERSON_RAISING_BOTH_HANDS_IN_CELEBRATION => Ok(Emoticons::PersonRaisingBothHandsInCelebration),
PERSON_FROWNING => Ok(Emoticons::PersonFrowning),
PERSON_WITH_POUTING_FACE => Ok(Emoticons::PersonWithPoutingFace),
_ => Err(()),
}
}
}
impl Into<u32> for Emoticons {
fn into(self) -> u32 {
let c: char = self.into();
let hex = c
.escape_unicode()
.to_string()
.replace("\\u{", "")
.replace("}", "");
u32::from_str_radix(&hex, 16).unwrap()
}
}
impl std::convert::TryFrom<u32> for Emoticons {
type Error = ();
fn try_from(u: u32) -> Result<Self, Self::Error> {
if let Ok(c) = char::try_from(u) {
Self::try_from(c)
} else {
Err(())
}
}
}
impl Iterator for Emoticons {
type Item = Self;
fn next(&mut self) -> Option<Self> {
let index: u32 = (*self).into();
use std::convert::TryFrom;
Self::try_from(index + 1).ok()
}
}
impl Emoticons {
pub fn new() -> Self {
Emoticons::GrinningFace
}
pub fn name(&self) -> &str {
match self {
Emoticons::GrinningFace => "grinning face",
Emoticons::GrinningFaceWithSmilingEyes => "grinning face with smiling eyes",
Emoticons::FaceWithTearsOfJoy => "face with tears of joy",
Emoticons::SmilingFaceWithOpenMouth => "smiling face with open mouth",
Emoticons::SmilingFaceWithOpenMouthAndSmilingEyes => "smiling face with open mouth and smiling eyes",
Emoticons::SmilingFaceWithOpenMouthAndColdSweat => "smiling face with open mouth and cold sweat",
Emoticons::SmilingFaceWithOpenMouthAndTightlyDashClosedEyes => "smiling face with open mouth and tightly-closed eyes",
Emoticons::SmilingFaceWithHalo => "smiling face with halo",
Emoticons::SmilingFaceWithHorns => "smiling face with horns",
Emoticons::WinkingFace => "winking face",
Emoticons::SmilingFaceWithSmilingEyes => "smiling face with smiling eyes",
Emoticons::FaceSavouringDeliciousFood => "face savouring delicious food",
Emoticons::RelievedFace => "relieved face",
Emoticons::SmilingFaceWithHeartDashShapedEyes => "smiling face with heart-shaped eyes",
Emoticons::SmilingFaceWithSunglasses => "smiling face with sunglasses",
Emoticons::SmirkingFace => "smirking face",
Emoticons::NeutralFace => "neutral face",
Emoticons::ExpressionlessFace => "expressionless face",
Emoticons::UnamusedFace => "unamused face",
Emoticons::FaceWithColdSweat => "face with cold sweat",
Emoticons::PensiveFace => "pensive face",
Emoticons::ConfusedFace => "confused face",
Emoticons::ConfoundedFace => "confounded face",
Emoticons::KissingFace => "kissing face",
Emoticons::FaceThrowingAKiss => "face throwing a kiss",
Emoticons::KissingFaceWithSmilingEyes => "kissing face with smiling eyes",
Emoticons::KissingFaceWithClosedEyes => "kissing face with closed eyes",
Emoticons::FaceWithStuckDashOutTongue => "face with stuck-out tongue",
Emoticons::FaceWithStuckDashOutTongueAndWinkingEye => "face with stuck-out tongue and winking eye",
Emoticons::FaceWithStuckDashOutTongueAndTightlyDashClosedEyes => "face with stuck-out tongue and tightly-closed eyes",
Emoticons::DisappointedFace => "disappointed face",
Emoticons::WorriedFace => "worried face",
Emoticons::AngryFace => "angry face",
Emoticons::PoutingFace => "pouting face",
Emoticons::CryingFace => "crying face",
Emoticons::PerseveringFace => "persevering face",
Emoticons::FaceWithLookOfTriumph => "face with look of triumph",
Emoticons::DisappointedButRelievedFace => "disappointed but relieved face",
Emoticons::FrowningFaceWithOpenMouth => "frowning face with open mouth",
Emoticons::AnguishedFace => "anguished face",
Emoticons::FearfulFace => "fearful face",
Emoticons::WearyFace => "weary face",
Emoticons::SleepyFace => "sleepy face",
Emoticons::TiredFace => "tired face",
Emoticons::GrimacingFace => "grimacing face",
Emoticons::LoudlyCryingFace => "loudly crying face",
Emoticons::FaceWithOpenMouth => "face with open mouth",
Emoticons::HushedFace => "hushed face",
Emoticons::FaceWithOpenMouthAndColdSweat => "face with open mouth and cold sweat",
Emoticons::FaceScreamingInFear => "face screaming in fear",
Emoticons::AstonishedFace => "astonished face",
Emoticons::FlushedFace => "flushed face",
Emoticons::SleepingFace => "sleeping face",
Emoticons::DizzyFace => "dizzy face",
Emoticons::FaceWithoutMouth => "face without mouth",
Emoticons::FaceWithMedicalMask => "face with medical mask",
Emoticons::GrinningCatFaceWithSmilingEyes => "grinning cat face with smiling eyes",
Emoticons::CatFaceWithTearsOfJoy => "cat face with tears of joy",
Emoticons::SmilingCatFaceWithOpenMouth => "smiling cat face with open mouth",
Emoticons::SmilingCatFaceWithHeartDashShapedEyes => "smiling cat face with heart-shaped eyes",
Emoticons::CatFaceWithWrySmile => "cat face with wry smile",
Emoticons::KissingCatFaceWithClosedEyes => "kissing cat face with closed eyes",
Emoticons::PoutingCatFace => "pouting cat face",
Emoticons::CryingCatFace => "crying cat face",
Emoticons::WearyCatFace => "weary cat face",
Emoticons::SlightlyFrowningFace => "slightly frowning face",
Emoticons::SlightlySmilingFace => "slightly smiling face",
Emoticons::UpsideDashDownFace => "upside-down face",
Emoticons::FaceWithRollingEyes => "face with rolling eyes",
Emoticons::FaceWithNoGoodGesture => "face with no good gesture",
Emoticons::FaceWithOkGesture => "face with ok gesture",
Emoticons::PersonBowingDeeply => "person bowing deeply",
Emoticons::SeeDashNoDashEvilMonkey => "see-no-evil monkey",
Emoticons::HearDashNoDashEvilMonkey => "hear-no-evil monkey",
Emoticons::SpeakDashNoDashEvilMonkey => "speak-no-evil monkey",
Emoticons::HappyPersonRaisingOneHand => "happy person raising one hand",
Emoticons::PersonRaisingBothHandsInCelebration => "person raising both hands in celebration",
Emoticons::PersonFrowning => "person frowning",
Emoticons::PersonWithPoutingFace => "person with pouting face",
}
}
}