[][src]Struct emoji_searcher::EmojiSearcher

pub struct EmojiSearcher { /* fields omitted */ }

An emoji searcher

Implementations

impl EmojiSearcher[src]

pub fn new(db: Rc<EmojiDb>) -> EmojiSearcher[src]

Creates a new emoji searcher with the provided database

pub fn search(&self, search: String) -> impl Iterator<Item = SearchResult<'_>>[src]

Search for an emoji matching the given string.

This will match any emoji that has a shortcode or a tag that contains the provided search string. The return value is an iterator of results that contain both the provided emoji as well as the tag that matched the provided search

pub fn swap_db(&mut self, new_db: Rc<EmojiDb>)[src]

Update the internal emoji database with a new one. Can be used with EmojiDb::from_web to provide an updated database

Auto Trait Implementations

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> 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