sea-orm-sluggable 0.1.2

Unique, transliterated slugs for SeaORM entities
Documentation
/// Turns text in any script into ASCII before it becomes a slug.
///
/// Implement it to support a language with its own romanization rules:
///
/// ```
/// use sea_orm_sluggable::Transliterator;
///
/// struct Shouting;
///
/// impl Transliterator for Shouting {
///     fn transliterate(&self, text: &str) -> String {
///         text.to_uppercase()
///     }
/// }
/// ```
pub trait Transliterator: Send + Sync {
    /// Returns `text` written with ASCII characters only.
    fn transliterate(&self, text: &str) -> String;
}

/// Generic transliteration for every script, via the `any_ascii` crate.
///
/// Good enough for most text, but it does not know national rules:
/// Ukrainian "Юрій" becomes "Yuriy" here and "Yurii" officially.
#[derive(Debug, Clone, Copy, Default)]
pub struct AnyAscii;

impl Transliterator for AnyAscii {
    fn transliterate(&self, text: &str) -> String {
        any_ascii::any_ascii(text)
    }
}