AssetLoader
struct · ferroui-base · v0.5.0
struct AssetLoader
Provides access to the assets compiled into the application binary,
through the registered IAssetLoader.
Members
set_default_assemblyexistsopenopen_and_get_assemblyget_assemblyget_assetsinvalidate_assembly_cacheinvalidate_assembly_cache_all
set_default_assembly
fn set_default_assembly(assembly: &AssetAssembly)
Sets the default assembly from which to load embedded-resource
(resm:) assets for which no assembly is specified.
exists
fn exists(uri: &UriRef, base_uri: Option<&url::Url>) -> bool
Checks if an asset with the specified URI exists.
open
fn open(uri: &UriRef, base_uri: Option<&url::Url>) -> std::io::Result<Box<dyn AssetStream>>
Opens the asset with the requested URI.
open_and_get_assembly
fn open_and_get_assembly(uri: &UriRef, base_uri: Option<&url::Url>) -> std::io::Result<(Box<dyn AssetStream>, AssetAssembly)>
Opens the asset with the requested URI and returns the asset stream along with the assembly containing the asset.
get_assembly
fn get_assembly(uri: &UriRef, base_uri: Option<&url::Url>) -> Option<AssetAssembly>
Extracts the assembly information from a URI.
get_assets
fn get_assets(uri: &UriRef, base_uri: Option<&url::Url>) -> Vec<url::Url>
Gets all assets of a folder and its subfolders that match the specified URI.
invalidate_assembly_cache
fn invalidate_assembly_cache(name: &str)
Removes the cached descriptor of the assembly with the given name.
invalidate_assembly_cache_all
fn invalidate_assembly_cache_all()
Removes all cached assembly descriptors.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.