[][src]Trait i18n_embed::I18nAssets

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

A trait to handle the retrieval of localization assets.

Required methods

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).

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

Get an iterator over the filenames of the localization assets.

Loading content...

Implementors

impl I18nAssets for FileSystemAssets[src]

impl<T> I18nAssets for T where
    T: RustEmbed + 'static, 
[src]

Loading content...