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
Available on crate feature filesystem-assets only.
impl I18nAssets for FileSystemAssets
Available on crate feature
filesystem-assets only.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