Skip to main content

EmojiCatalogue

Trait EmojiCatalogue 

pub trait EmojiCatalogue: Sync {
    // Required methods
    fn groups(&self) -> Vec<CatalogueGroup>;
    fn group_emoji(&self, index: usize) -> Vec<&'static str>;
    fn search(&self, query: &str, limit: usize) -> Vec<&'static str>;
    fn info(&self, emoji: &str) -> Option<EmojiInfo>;
    fn tones(&self, emoji: &str) -> Vec<&'static str>;
}
Expand description

The emoji catalogue in one language, as the picker reads it.

Required Methods§

fn groups(&self) -> Vec<CatalogueGroup>

The groups, in Unicode order.

fn group_emoji(&self, index: usize) -> Vec<&'static str>

The emoji of group index, in Unicode order, without skin tones.

fn search(&self, query: &str, limit: usize) -> Vec<&'static str>

Up to limit emoji matching query by name or keyword, best first.

fn info(&self, emoji: &str) -> Option<EmojiInfo>

What emoji (with or without a tone) is, when the catalogue has it.

fn tones(&self, emoji: &str) -> Vec<&'static str>

emoji in each of its forms: without a tone, then each tone from the lightest. Empty for an emoji that takes no tone.

Implementors§