pub trait IResourceNode {
// Required methods
fn has_resources(&self) -> bool;
fn try_get_resource(
&self,
key: &ResourceKey,
theme: Option<&ThemeVariant>,
) -> Option<ResourceValue>;
}Expand description
Represents a resource provider in a tree.
Required Methods§
Sourcefn has_resources(&self) -> bool
fn has_resources(&self) -> bool
Whether the resource node has resources.
Sourcefn try_get_resource(
&self,
key: &ResourceKey,
theme: Option<&ThemeVariant>,
) -> Option<ResourceValue>
fn try_get_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<ResourceValue>
Tries to find a resource within the node.
Returns Some with the resource if it was found. See the theme
dictionaries of a resource dictionary for how theme is used.
Trait Implementations§
Source§impl MarkupTyped for dyn IResourceNode
impl MarkupTyped for dyn IResourceNode
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Source§impl PartialEq for dyn IResourceNode
Handles compare by identity (reference equality): two handles are equal
when they refer to the same object, whichever adapter they were made
from.
impl PartialEq for dyn IResourceNode
Handles compare by identity (reference equality): two handles are equal when they refer to the same object, whichever adapter they were made from.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".