FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    NEVER_THIS_TYPE

    const NEVER_THIS_TYPE: SelectorMatch
    

    A selector match with the result of SelectorMatchResult::NeverThisType.

    Source

    NEVER_THIS_INSTANCE

    const NEVER_THIS_INSTANCE: SelectorMatch
    

    A selector match with the result of SelectorMatchResult::NeverThisInstance.

    Source

    ALWAYS_THIS_TYPE

    const ALWAYS_THIS_TYPE: SelectorMatch
    

    A selector match with the result of SelectorMatchResult::AlwaysThisType.

    Source

    ALWAYS_THIS_INSTANCE

    const ALWAYS_THIS_INSTANCE: SelectorMatch
    

    A selector match with the result of SelectorMatchResult::AlwaysThisInstance.

    Source

    sometimes

    fn sometimes(activator: Rc<dyn IStyleActivator>) -> Self
    

    Creates a match with a SelectorMatchResult::Sometimes result, whose state is tracked by activator.

    Source

    new

    const fn new(result: SelectorMatchResult) -> Self
    

    Creates a match with the specified result and no activator.

    Source

    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.

    Source

    result

    fn result(self: &Self) -> SelectorMatchResult
    

    The result of the selector match.

    Source

    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.

    Source

    and

    fn and(self: Self, other: SelectorMatch) -> SelectorMatch
    

    Logical-AND the selector match with another.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • Display

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.