Trait i18n_embed::I18nAssets
source · 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§
sourcefn get_file(&self, file_path: &str) -> Option<Cow<'_, [u8]>>
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).
sourcefn filenames_iter(&self) -> Box<dyn Iterator<Item = String>>
fn filenames_iter(&self) -> Box<dyn Iterator<Item = String>>
Get an iterator over the filenames of the localization assets.