pub struct FileLoader { /* private fields */ }Expand description
File-based asset loader for editor/development mode.
Reads assets directly from individual files on disk. The root path is
typically <project>/assets/.
Implementations§
Trait Implementations§
Source§impl AssetIo for FileLoader
impl AssetIo for FileLoader
Source§impl AssetWriter for FileLoader
impl AssetWriter for FileLoader
Source§fn write_bytes(&self, rel_path: &Path, bytes: &[u8]) -> Result<()>
fn write_bytes(&self, rel_path: &Path, bytes: &[u8]) -> Result<()>
Writes
bytes to a path relative to the loader’s root. Creates
intermediate directories as needed. The relative path is the same
shape that AssetSource::Path(rel) records — IndexBuilder will
see the new file on the next scan and assign it a stable UUID.Auto Trait Implementations§
impl Freeze for FileLoader
impl RefUnwindSafe for FileLoader
impl Send for FileLoader
impl Sync for FileLoader
impl Unpin for FileLoader
impl UnsafeUnpin for FileLoader
impl UnwindSafe for FileLoader
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more