pub trait ToLocaleStr {
    // Required method
    fn to_locale_str(&self) -> &str;

    // Provided method
    fn to_locale_string(&self) -> LocaleString { ... }
}
Expand description

Marker for a type that is i18n friendly.

When i18n support is enabled, only types which implemented this trait can be used in text node.

Required Methods§

source

fn to_locale_str(&self) -> &str

Get the translated text.

Provided Methods§

source

fn to_locale_string(&self) -> LocaleString

Get the owned string of the translated text.

Implementations on Foreign Types§

source§

impl<T: ?Sized + ToLocaleStr> ToLocaleStr for &T

Implementors§