pub struct AssetsMultiplexor { /* private fields */ }Expand description
A way to multiplex implementations of I18nAssets.
Implementations§
Source§impl AssetsMultiplexor
impl AssetsMultiplexor
Sourcepub fn new(
assets: impl IntoIterator<Item = Box<dyn I18nAssets + Send + Sync + 'static>>,
) -> Self
pub fn new( assets: impl IntoIterator<Item = Box<dyn I18nAssets + Send + Sync + 'static>>, ) -> Self
Construct a new AssetsMultiplexor. assets are specified in order of priority of
processing for the crate::LanguageLoader.
Trait Implementations§
Source§impl Debug for AssetsMultiplexor
impl Debug for AssetsMultiplexor
Source§impl I18nAssets for AssetsMultiplexor
impl I18nAssets for AssetsMultiplexor
Source§fn get_files(&self, file_path: &str) -> Vec<Cow<'_, [u8]>>
fn get_files(&self, file_path: &str) -> Vec<Cow<'_, [u8]>>
Get localization asset files that correspond to the specified
file_path. Returns an empty
Vec 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> + '_>
fn filenames_iter(&self) -> Box<dyn Iterator<Item = String> + '_>
Get an iterator over the file paths of the localization assets. There may be duplicates
where multiple files exist for the same file path.
Auto Trait Implementations§
impl Freeze for AssetsMultiplexor
impl !RefUnwindSafe for AssetsMultiplexor
impl Send for AssetsMultiplexor
impl Sync for AssetsMultiplexor
impl Unpin for AssetsMultiplexor
impl !UnwindSafe for AssetsMultiplexor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more