Struct i18n_embed::FileSystemAssets
source · pub struct FileSystemAssets { /* private fields */ }
Expand description
An I18nAssets implementation which pulls assets from the OS file system.
Implementations§
source§impl FileSystemAssets
impl FileSystemAssets
sourcepub fn try_new<P: Into<PathBuf>>(base_dir: P) -> Result<Self, I18nEmbedError>
pub fn try_new<P: Into<PathBuf>>(base_dir: P) -> Result<Self, I18nEmbedError>
Create a new FileSystemAssets
instance, all files will be
read from within the specified base directory.
sourcepub fn notify_changes_enabled(self, enabled: bool) -> Self
pub fn notify_changes_enabled(self, enabled: bool) -> Self
Enable the notification of changes in the I18nAssets
implementation.
Trait Implementations§
source§impl Debug for FileSystemAssets
impl Debug for FileSystemAssets
source§impl I18nAssets for FileSystemAssets
impl I18nAssets for FileSystemAssets
source§fn subscribe_changed(
&self,
changed: Arc<dyn Fn() + Send + Sync + 'static>,
) -> Result<Box<dyn Watcher + Send + Sync + 'static>, I18nEmbedError>
fn subscribe_changed( &self, changed: Arc<dyn Fn() + Send + Sync + 'static>, ) -> Result<Box<dyn Watcher + Send + Sync + 'static>, I18nEmbedError>
See FileSystemAssets::notify_changes_enabled
to enable this implementation.
⚠️ This method requires the following crate features to be activated: autoreload
.
Auto Trait Implementations§
impl Freeze for FileSystemAssets
impl RefUnwindSafe for FileSystemAssets
impl Send for FileSystemAssets
impl Sync for FileSystemAssets
impl Unpin for FileSystemAssets
impl UnwindSafe for FileSystemAssets
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