Skip to main content

ResourceProviderImpl

Trait ResourceProviderImpl 

Source
pub trait ResourceProviderImpl: FerroObjectImpl + Upcast<ResourceProvider> {
    // Provided methods
    fn has_resources(this: &Self) -> bool { ... }
    fn try_get_resource(
        this: &Self,
        key: &ResourceKey,
        theme: Option<&ThemeVariant>,
    ) -> Option<ResourceValue> { ... }
    fn on_add_owner(this: &Self, owner: &ResourceHostRef) { ... }
    fn on_remove_owner(this: &Self, owner: &ResourceHostRef) { ... }
}
Expand description

The overridable members introduced by the class.

Provided Methods§

Source

fn has_resources(this: &Self) -> bool

Whether the provider has resources.

Source

fn try_get_resource( this: &Self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<ResourceValue>

Tries to find a resource within the provider.

Source

fn on_add_owner(this: &Self, owner: &ResourceHostRef)

Handles when the owner is added. The base method notifies the owner about its resources changing, if the provider has any.

Source

fn on_remove_owner(this: &Self, owner: &ResourceHostRef)

Handles when the owner is removed. The base method notifies the owner about its resources changing, if the provider has any.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§