pub struct NameScopeExtensions;Expand description
Name scope lookups anchored at a styled element.
Implementations§
Source§impl NameScopeExtensions
impl NameScopeExtensions
Sourcepub fn find<T: ObjectType>(anchor: &StyledElement, name: &str) -> Option<Ref<T>>
pub fn find<T: ObjectType>(anchor: &StyledElement, name: &str) -> Option<Ref<T>>
Finds a named element in the name scope attached to anchor.
Sourcepub fn get<T: ObjectType>(anchor: &StyledElement, name: &str) -> Ref<T>
pub fn get<T: ObjectType>(anchor: &StyledElement, name: &str) -> Ref<T>
Gets a named element from the name scope attached to anchor.
Panics if the element has no name scope, the name is not registered or the named element is of a different class.
Sourcepub fn find_name_scope(control: &StyledElement) -> Option<NameScopeRef>
pub fn find_name_scope(control: &StyledElement) -> Option<NameScopeRef>
Finds the name scope of control by walking up its logical ancestors.
Auto Trait Implementations§
impl Freeze for NameScopeExtensions
impl RefUnwindSafe for NameScopeExtensions
impl Send for NameScopeExtensions
impl Sync for NameScopeExtensions
impl Unpin for NameScopeExtensions
impl UnsafeUnpin for NameScopeExtensions
impl UnwindSafe for NameScopeExtensions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more