zng_ext_l10n

Trait L10nSource

source
pub trait L10nSource: Send + 'static {
    // Required methods
    fn available_langs(
        &mut self,
    ) -> BoxedVar<Arc<LangMap<HashMap<LangFilePath, PathBuf>>>>;
    fn available_langs_status(&mut self) -> BoxedVar<LangResourceStatus>;
    fn lang_resource(
        &mut self,
        lang: Lang,
        file: LangFilePath,
    ) -> BoxedVar<Option<ArcEq<FluentResource>>>;
    fn lang_resource_status(
        &mut self,
        lang: Lang,
        file: LangFilePath,
    ) -> BoxedVar<LangResourceStatus>;
}
Expand description

Represents a localization data source.

See L10N.load for more details.

Required Methods§

source

fn available_langs( &mut self, ) -> BoxedVar<Arc<LangMap<HashMap<LangFilePath, PathBuf>>>>

Gets a read-only variable with all lang files that the source can provide.

source

fn available_langs_status(&mut self) -> BoxedVar<LangResourceStatus>

Gets a read-only variable that is the status of the available_langs value.

source

fn lang_resource( &mut self, lang: Lang, file: LangFilePath, ) -> BoxedVar<Option<ArcEq<FluentResource>>>

Gets a read-only variable that provides the fluent resource for the lang and file if available.

source

fn lang_resource_status( &mut self, lang: Lang, file: LangFilePath, ) -> BoxedVar<LangResourceStatus>

Gets a read-only variable that is the status of the lang_resource value.

Implementors§