pub trait I18nAssets {
    // Required methods
    fn get_file(&self, file_path: &str) -> Option<Cow<'_, [u8]>>;
    fn filenames_iter(&self) -> Box<dyn Iterator<Item = String>>;
}
Expand description

A trait to handle the retrieval of localization assets.

Required Methods§

source

fn get_file(&self, file_path: &str) -> Option<Cow<'_, [u8]>>

Get a localization asset (returns None if the asset does not exist, or unable to obtain the asset due to a non-critical error).

source

fn filenames_iter(&self) -> Box<dyn Iterator<Item = String>>

Get an iterator over the filenames of the localization assets.

Implementors§

source§

impl I18nAssets for FileSystemAssets

source§

impl<T> I18nAssets for Twhere T: RustEmbed + 'static,