pub trait TileExt: Tile {
// Provided methods
fn is_configured(&self) -> bool { ... }
fn is_sized(&self) -> bool { ... }
fn eq_id<T>(&self, rhs: T) -> bool
where Id: PartialEq<T> { ... }
fn is_ancestor_of(&self, id: &Id) -> bool { ... }
fn is_strict_ancestor_of(&self, id: &Id) -> bool { ... }
fn children(&self) -> impl Iterator<Item = &dyn Tile> { ... }
fn find_tile(&self, id: &Id) -> Option<&dyn Tile> { ... }
fn find_tile_rect(&self, id: &Id) -> Option<(Rect, Offset)> { ... }
}Expand description
Extension trait over widgets
Provided Methods§
Sourcefn is_configured(&self) -> bool
fn is_configured(&self) -> bool
Check whether this widget has been configured
This is set once configuration is complete.
Sourcefn is_sized(&self) -> bool
fn is_sized(&self) -> bool
Check whether this widget has been sized
This is set once sizing is complete.
Sourcefn eq_id<T>(&self, rhs: T) -> bool
fn eq_id<T>(&self, rhs: T) -> bool
Test widget identifier for equality
This method may be used to test against Id, Option<Id>
and Option<&Id>.
Sourcefn is_ancestor_of(&self, id: &Id) -> bool
fn is_ancestor_of(&self, id: &Id) -> bool
Check whether id is self or a descendant
This function assumes that id is a valid widget.
Sourcefn is_strict_ancestor_of(&self, id: &Id) -> bool
fn is_strict_ancestor_of(&self, id: &Id) -> bool
Check whether id is not self and is a descendant
This function assumes that id is a valid widget.
Sourcefn children(&self) -> impl Iterator<Item = &dyn Tile>
fn children(&self) -> impl Iterator<Item = &dyn Tile>
Return an iterator over visible children
This method may exclude hidden children: see Tile::child_indices.
Sourcefn find_tile(&self, id: &Id) -> Option<&dyn Tile>
fn find_tile(&self, id: &Id) -> Option<&dyn Tile>
Find the descendant with this id, if any
Since id represents a path, this operation is normally O(d) where
d is the depth of the path (depending on widget implementations).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".