pub struct StandardAssetLoader { /* private fields */ }Expand description
Loads assets compiled into the application binary.
The type is considered unstable; use the functions of
AssetLoader instead.
Implementations§
Source§impl StandardAssetLoader
impl StandardAssetLoader
Sourcepub fn new(assembly: Option<&AssetAssembly>) -> Self
pub fn new(assembly: Option<&AssetAssembly>) -> Self
Creates an asset loader. assembly is the default assembly from
which to load embedded-resource (resm:) assets for which no
assembly is specified.
Trait Implementations§
Source§impl Default for StandardAssetLoader
impl Default for StandardAssetLoader
Source§impl IAssetLoader for StandardAssetLoader
impl IAssetLoader for StandardAssetLoader
Source§fn set_default_assembly(&self, assembly: &AssetAssembly)
fn set_default_assembly(&self, assembly: &AssetAssembly)
Sets the default assembly from which to load embedded-resource
(
resm:) assets for which no assembly is specified.Source§fn exists(&self, uri: &Uri, base_uri: Option<&Uri>) -> bool
fn exists(&self, uri: &Uri, base_uri: Option<&Uri>) -> bool
Checks if an asset with the specified URI exists. Read more
Source§fn open(
&self,
uri: &Uri,
base_uri: Option<&Uri>,
) -> Result<Box<dyn AssetStream>>
fn open( &self, uri: &Uri, base_uri: Option<&Uri>, ) -> Result<Box<dyn AssetStream>>
Opens the asset with the requested URI. Read more
Source§fn open_and_get_assembly(
&self,
uri: &Uri,
base_uri: Option<&Uri>,
) -> Result<(Box<dyn AssetStream>, AssetAssembly)>
fn open_and_get_assembly( &self, uri: &Uri, base_uri: Option<&Uri>, ) -> Result<(Box<dyn AssetStream>, AssetAssembly)>
Opens the asset with the requested URI and returns the asset stream
along with the assembly containing the asset.
Source§fn get_assembly(
&self,
uri: &Uri,
base_uri: Option<&Uri>,
) -> Option<AssetAssembly>
fn get_assembly( &self, uri: &Uri, base_uri: Option<&Uri>, ) -> Option<AssetAssembly>
Extracts the assembly information from a URI.
Source§fn get_assets(&self, uri: &Uri, base_uri: Option<&Uri>) -> Vec<Uri>
fn get_assets(&self, uri: &Uri, base_uri: Option<&Uri>) -> Vec<Uri>
Gets all assets of a folder and its subfolders that match the
specified URI.
Source§fn invalidate_assembly_cache(&self, name: &str)
fn invalidate_assembly_cache(&self, name: &str)
Removes the cached descriptor of the assembly with the given name, so
that assets it registered afterwards become visible.
Source§fn invalidate_assembly_cache_all(&self)
fn invalidate_assembly_cache_all(&self)
Removes all cached assembly descriptors.
Auto Trait Implementations§
impl !Freeze for StandardAssetLoader
impl !RefUnwindSafe for StandardAssetLoader
impl !Send for StandardAssetLoader
impl !Sync for StandardAssetLoader
impl !UnwindSafe for StandardAssetLoader
impl Unpin for StandardAssetLoader
impl UnsafeUnpin for StandardAssetLoader
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more