# IModeDetector

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-splat/mode_detection/trait-imodedetector/

**trait** · [`ferroui-splat`](/docs/0.5.0/api/ferroui-splat/) · v0.5.0

```rust
trait IModeDetector
```

Detects whether the code runs under a unit test runner (`IModeDetector`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/mode_detection/mod.rs#L12)

## Members

- [`in_unit_test_runner`](#function-in_unit_test_runner)

<a id="function-in_unit_test_runner"></a>

### in_unit_test_runner

```rust
fn in_unit_test_runner(self: &Self) -> Option<bool>
```

`Some(true)` under a unit test runner, `Some(false)` outside one, `None` when it cannot
tell (`InUnitTestRunner`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/mode_detection/mod.rs#L15)

## Trait implementations

- [`IModeDetector`](/docs/0.5.0/api/ferroui-splat/mode_detection/trait-imodedetector/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
