pub struct PachaLoader { /* private fields */ }Expand description
Pacha resource loader.
Implementations§
Source§impl PachaLoader
impl PachaLoader
Sourcepub fn current_dir() -> Self
pub fn current_dir() -> Self
Create a loader using current directory.
Sourcepub fn load(&mut self, uri: &str) -> Result<&LoadedResource, PachaError>
pub fn load(&mut self, uri: &str) -> Result<&LoadedResource, PachaError>
Sourcepub fn load_fresh(&self, uri: &str) -> Result<LoadedResource, PachaError>
pub fn load_fresh(&self, uri: &str) -> Result<LoadedResource, PachaError>
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the resource cache.
Sourcepub fn get_cached(&self, uri: &str) -> Option<&LoadedResource>
pub fn get_cached(&self, uri: &str) -> Option<&LoadedResource>
Get a cached resource if available.
Auto Trait Implementations§
impl Freeze for PachaLoader
impl RefUnwindSafe for PachaLoader
impl Send for PachaLoader
impl Sync for PachaLoader
impl Unpin for PachaLoader
impl UnsafeUnpin for PachaLoader
impl UnwindSafe for PachaLoader
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