SelectorMatch
struct · ferroui-base · v0.5.0
struct SelectorMatch
Holds the result of a selector match.
A selector match describes whether and how a selector matches a control, and in addition whether the selector can ever match a control of the same type.
Members
NEVER_THIS_TYPENEVER_THIS_INSTANCEALWAYS_THIS_TYPEALWAYS_THIS_INSTANCEsometimesnewis_matchresultactivatorand
NEVER_THIS_TYPE
const NEVER_THIS_TYPE: SelectorMatch
A selector match with the result of SelectorMatchResult::NeverThisType.
NEVER_THIS_INSTANCE
const NEVER_THIS_INSTANCE: SelectorMatch
A selector match with the result of SelectorMatchResult::NeverThisInstance.
ALWAYS_THIS_TYPE
const ALWAYS_THIS_TYPE: SelectorMatch
A selector match with the result of SelectorMatchResult::AlwaysThisType.
ALWAYS_THIS_INSTANCE
const ALWAYS_THIS_INSTANCE: SelectorMatch
A selector match with the result of SelectorMatchResult::AlwaysThisInstance.
sometimes
fn sometimes(activator: Rc<dyn IStyleActivator>) -> Self
Creates a match with a SelectorMatchResult::Sometimes result,
whose state is tracked by activator.
new
const fn new(result: SelectorMatchResult) -> Self
Creates a match with the specified result and no activator.
is_match
fn is_match(self: &Self) -> bool
Whether the match was positive.
The match is positive if the result is Sometimes,
AlwaysThisInstance or AlwaysThisType.
result
fn result(self: &Self) -> SelectorMatchResult
The result of the selector match.
activator
fn activator(self: &Self) -> Option<&Rc<dyn IStyleActivator>>
An activator which tracks the selector match, in the case of selectors that can change over time.
and
fn and(self: Self, other: SelectorMatch) -> SelectorMatch
Logical-AND the selector match with another.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneDebugDisplay
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.