pub trait Backend:
Send
+ Sync
+ 'static {
// Required methods
fn available_locales(&self) -> Vec<Cow<'_, str>>;
fn translate(&self, locale: &str, key: &str) -> Option<Cow<'_, str>>;
fn messages_for_locale(
&self,
locale: &str,
) -> Option<Vec<(Cow<'_, str>, Cow<'_, str>)>>;
}Expand description
I18n backend trait
Required Methods§
Sourcefn available_locales(&self) -> Vec<Cow<'_, str>>
fn available_locales(&self) -> Vec<Cow<'_, str>>
Return the available locales
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".