Struct veloren_common_assets::fs::FileSystem
source · pub struct FileSystem {
default: FileSystem,
override_dir: Option<FileSystem>,
}
Expand description
Loads assets from the default path or VELOREN_ASSETS_OVERRIDE
env if it is
set.
Fields§
§default: FileSystem
§override_dir: Option<FileSystem>
Implementations§
Trait Implementations§
source§impl Clone for FileSystem
impl Clone for FileSystem
source§fn clone(&self) -> FileSystem
fn clone(&self) -> FileSystem
Returns a copy 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 FileSystem
impl Debug for FileSystem
source§impl Source for FileSystem
impl Source for FileSystem
source§fn read(&self, id: &str, ext: &str) -> Result<FileContent<'_>>
fn read(&self, id: &str, ext: &str) -> Result<FileContent<'_>>
Try reading the source given an id and an extension. Read more
source§fn read_dir(&self, id: &str, f: &mut dyn FnMut(DirEntry<'_>)) -> Result<()>
fn read_dir(&self, id: &str, f: &mut dyn FnMut(DirEntry<'_>)) -> Result<()>
Reads the content of a directory. Read more
source§fn exists(&self, entry: DirEntry<'_>) -> bool
fn exists(&self, entry: DirEntry<'_>) -> bool
Returns
true
if the entry points at an existing entity. Read moresource§fn make_source(&self) -> Option<Box<dyn Source + Send>>
fn make_source(&self) -> Option<Box<dyn Source + Send>>
Returns a source to use with hot-reloading. Read more
source§fn configure_hot_reloading(&self, events: EventSender) -> Result<(), BoxedError>
fn configure_hot_reloading(&self, events: EventSender) -> Result<(), BoxedError>
Configures hot-reloading. Read more
Auto Trait Implementations§
impl Freeze for FileSystem
impl RefUnwindSafe for FileSystem
impl Send for FileSystem
impl Sync for FileSystem
impl Unpin for FileSystem
impl UnwindSafe for FileSystem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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