pub struct CombinedSource {
fs: AssetCache<FileSystem>,
plugin_list: RwLock<Vec<PluginEntry>>,
}
Expand description
This source combines assets loaded from the filesystem and from plugins. It is typically used via the CombinedCache type.
A load will search through all sources and warn about unhandled duplicates.
Fields§
§fs: AssetCache<FileSystem>
§plugin_list: RwLock<Vec<PluginEntry>>
Implementations§
source§impl CombinedSource
impl CombinedSource
sourcefn read_multiple(&self, id: &str, ext: &str) -> Vec<SourceAndContents<'_>>
fn read_multiple(&self, id: &str, ext: &str) -> Vec<SourceAndContents<'_>>
Look for an asset in all known sources
sourcefn plugin_path(&self, index: &AssetSource) -> Option<PathBuf>
fn plugin_path(&self, index: &AssetSource) -> Option<PathBuf>
Return the path of a source
Trait Implementations§
source§impl Source for CombinedSource
impl Source for CombinedSource
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 CombinedSource
impl RefUnwindSafe for CombinedSource
impl Send for CombinedSource
impl Sync for CombinedSource
impl Unpin for CombinedSource
impl UnwindSafe for CombinedSource
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
§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