MultiLingual

Trait MultiLingual 

Source
pub trait MultiLingual {
    // Required method
    fn add_label(
        &mut self,
        tag: &MyLanguageTag,
        label: &str,
    ) -> Result<&mut Self, DataError>;
}
Expand description

xAPI refers to a Language Map as a dictionary of words or sentences keyed by the RFC 5646: “Tags for Identifying Languages”.

This trait exposes a way for populating such dictionaries.

Note though that the recommended way for populating a Language Map is through the add_language macro.

Required Methods§

Source

fn add_label( &mut self, tag: &MyLanguageTag, label: &str, ) -> Result<&mut Self, DataError>

A Builder style method to add to, and if successful return, self (a LanguageMap) a label string in a given language tag.

Raise DataError if an error occurs in the process.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§