[][src]Struct text_transliterate::TextTransliterateOffThread

pub struct TextTransliterateOffThread { /* fields omitted */ }

Transliterate from the chosen locale to ascii. This function will create another thread in order to isolate the locale set for iconv effects.

Methods

impl TextTransliterateOffThread[src]

pub fn new() -> TextTransliterateOffThread[src]

pub fn transliterate<S: Into<String>>(
    &mut self,
    text: S,
    locale: S
) -> Result<String, &'static str>
[src]

Synchronous transliteration. It will pause the thread until the second thread finish the transliteration.

pub async fn async_transliterate<'_, S: Into<String>>(
    &'_ mut self,
    text: S,
    locale: S
) -> Result<String, &'static str>
[src]

Async version of the transliterate method. Be aware that in cases of a lot of throughput, this method won't scale. In order to do that inside of a multicore async reactor (like Tokio or Async_Std) maybe is a better idea to use the Sync version with many instances of this struct.

Trait Implementations

impl Debug for TextTransliterateOffThread[src]

impl Default for TextTransliterateOffThread[src]

impl Drop for TextTransliterateOffThread[src]

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.