Framework for embedding localizations into Rust types
//! Implementations of `Localize` for various string types

use crate::Localize;
use std::borrow::Cow;

use icu_locale::Locale;

macro_rules! impl_string {
    ($string_type:ty) => {
        impl Localize for $string_type {
            fn localize_for(&self, _locale: &Locale) -> String {
                (*self).to_string()
            }
        }
    };
}

impl_string!(String);
impl_string!(&str);
impl_string!(Box<str>);
impl_string!(Cow<'_, str>);