Skip to main content

Translator

Trait Translator 

Source
pub trait Translator {
    // Required method
    fn translate(&self, key: &str) -> String;
}

Required Methods§

Source

fn translate(&self, key: &str) -> String

Translates a given key into its corresponding string representation.

If the translation key is unknown, return the key as a String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§