FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AssetLoader

    struct · ferroui-base · v0.5.0

    struct AssetLoader
    

    Provides access to the assets compiled into the application binary, through the registered IAssetLoader.

    View source

    Members

    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.

    Source

    exists

    fn exists(uri: &UriRef, base_uri: Option<&url::Url>) -> bool
    

    Checks if an asset with the specified URI exists.

    Source

    open

    fn open(uri: &UriRef, base_uri: Option<&url::Url>) -> std::io::Result<Box<dyn AssetStream>>
    

    Opens the asset with the requested URI.

    Source

    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.

    Source

    get_assembly

    fn get_assembly(uri: &UriRef, base_uri: Option<&url::Url>) -> Option<AssetAssembly>
    

    Extracts the assembly information from a URI.

    Source

    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.

    Source

    invalidate_assembly_cache

    fn invalidate_assembly_cache(name: &str)
    

    Removes the cached descriptor of the assembly with the given name.

    Source

    invalidate_assembly_cache_all

    fn invalidate_assembly_cache_all()
    

    Removes all cached assembly descriptors.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.