pub struct FilesystemAssetLoader { /* private fields */ }Expand description
Default filesystem-based asset loader for desktop platforms
This loader reads assets directly from the filesystem. It supports both relative paths (resolved from the current directory or a configured base path) and absolute paths.
Implementations§
Source§impl FilesystemAssetLoader
impl FilesystemAssetLoader
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new filesystem loader with no base path (relative paths resolved from current directory)
Sourcepub fn with_base_path(base: impl AsRef<Path>) -> Self
pub fn with_base_path(base: impl AsRef<Path>) -> Self
Create a filesystem loader with a base path for relative assets
Sourcepub fn set_base_path(&mut self, base: impl AsRef<Path>)
pub fn set_base_path(&mut self, base: impl AsRef<Path>)
Set the base path for relative assets
Trait Implementations§
Source§impl AssetLoader for FilesystemAssetLoader
impl AssetLoader for FilesystemAssetLoader
Source§fn platform_name(&self) -> &'static str
fn platform_name(&self) -> &'static str
Get the platform name for this loader
Source§impl Clone for FilesystemAssetLoader
impl Clone for FilesystemAssetLoader
Source§fn clone(&self) -> FilesystemAssetLoader
fn clone(&self) -> FilesystemAssetLoader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilesystemAssetLoader
impl Debug for FilesystemAssetLoader
Auto Trait Implementations§
impl Freeze for FilesystemAssetLoader
impl RefUnwindSafe for FilesystemAssetLoader
impl Send for FilesystemAssetLoader
impl Sync for FilesystemAssetLoader
impl Unpin for FilesystemAssetLoader
impl UnsafeUnpin for FilesystemAssetLoader
impl UnwindSafe for FilesystemAssetLoader
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