Skip to main content

IResourceNode

Trait IResourceNode 

Source
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§

Source

fn has_resources(&self) -> bool

Whether the resource node has resources.

Source

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

Source§

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.

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§