Skip to main content

ComponentLocator

Trait ComponentLocator 

Source
pub trait ComponentLocator: Sized {
    const KIND: &'static str;
    const ROOT: Role;

    // Required methods
    fn from_locator(root: Locator) -> Self;
    fn locator(&self) -> &Locator;

    // Provided method
    fn of_kind() -> Self { ... }
}
Available on crate feature icedwright only.
Expand description

A component’s locator, built over the locator for its root node.

Required Associated Constants§

Source

const KIND: &'static str

The kind the component’s annotations report, such as "iced_cube::tree".

Source

const ROOT: Role

The role of the component’s root node.

Required Methods§

Source

fn from_locator(root: Locator) -> Self

Wraps a locator that finds the component’s root.

Source

fn locator(&self) -> &Locator

The locator for the component’s root.

Provided Methods§

Source

fn of_kind() -> Self

Every component of this kind on the page. Its parts report the same kind, so this matches the root role as well.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl ComponentLocator for DocumentTabs

Source§

const KIND: &'static str = "iced_cube::document_tabs"

Source§

const ROOT: Role = Role::TabList

Source§

impl ComponentLocator for ImageCompare

Source§

const KIND: &'static str = "iced_cube::image_compare"

Source§

const ROOT: Role = Role::Group

Source§

impl ComponentLocator for Menu

Source§

const KIND: &'static str = "iced_cube::dropdown_menu"

Source§

const ROOT: Role = Role::Menu

Source§

impl ComponentLocator for Tabs

Source§

const KIND: &'static str = "iced_cube::tabs"

Source§

const ROOT: Role = Role::TabList

Source§

impl ComponentLocator for Timeline

Source§

const KIND: &'static str = "iced_cube::timeline"

Source§

const ROOT: Role = Role::Slider

Source§

impl ComponentLocator for Tree

Source§

const KIND: &'static str = "iced_cube::tree"

Source§

const ROOT: Role = Role::Tree

Source§

impl ComponentLocator for VirtualList

Source§

const KIND: &'static str = "iced_cube::virtual_list"

Source§

const ROOT: Role = Role::List