[−][src]Struct text_transliterate::TextTransliterateOffThread
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]
&mut self,
text: S,
locale: S
) -> Result<String, &'static str>
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]
&'_ mut self,
text: S,
locale: S
) -> Result<String, &'static str>
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
impl !RefUnwindSafe for TextTransliterateOffThread
impl Send for TextTransliterateOffThread
impl !Sync for TextTransliterateOffThread
impl Unpin for TextTransliterateOffThread
impl !UnwindSafe for TextTransliterateOffThread
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,