[][src]Struct emoji_searcher::EmojiDb

pub struct EmojiDb { /* fields omitted */ }

An emoji database

Implementations

impl EmojiDb[src]

pub fn new() -> EmojiDb[src]

Generates a new EmojiDb based off the database embedded in the library

pub fn from_cache<T: Read>(cache: &mut T) -> Result<EmojiDb, Box<dyn Error>>[src]

Generates an EmojiDb that was saved to the given cache

pub fn from_web() -> Result<EmojiDb, Box<dyn Error>>[src]

Generates a new EmojiDb based off data from the online repository maintained by the Emojibase project

pub fn save<T: Write>(&self, cache: &mut T) -> Result<(), Box<dyn Error>>[src]

Saves the existing EmojiDb the provided cache

pub fn needs_update(&self) -> bool[src]

Checks if a new version of the Emojibase project is available

pub fn emojis(&self) -> impl Iterator<Item = &Emoji>[src]

Retrieves an iterator over all emojis in the db

pub fn version(&self) -> &str[src]

Retrieves the corresponding Emojibase version

pub fn shortcode_sets(&self) -> &[HashMap<String, Vec<String>>][src]

Retrieves all shortcodes

Trait Implementations

impl Default for EmojiDb[src]

impl<'de> Deserialize<'de> for EmojiDb[src]

impl Serialize for EmojiDb[src]

Auto Trait Implementations

impl RefUnwindSafe for EmojiDb

impl Send for EmojiDb

impl Sync for EmojiDb

impl Unpin for EmojiDb

impl UnwindSafe for EmojiDb

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err