FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ModeDetector

    struct · ferroui-splat · v0.5.0

    struct ModeDetector
    

    Whether the code runs under a unit test runner, as the current detector tells, cached (ModeDetector). The detector is a DefaultModeDetector until it is overridden.

    View source

    Members

    override_mode_detector

    fn override_mode_detector(mode_detector: Rc<dyn IModeDetector>)
    

    Replaces the detector and forgets the cached result (OverrideModeDetector).

    Source

    in_unit_test_runner

    fn in_unit_test_runner() -> bool
    

    Whether the code runs under a unit test runner (InUnitTestRunner): the cached result, or what the detector tells, false when it cannot tell.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any

    Availability

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