# DevTools

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/struct-devtools/

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

```rust
struct DevTools
```

Attaches DevTools and opens its window.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L26)

## Members

- [`attach_with_gesture`](#function-attach_with_gesture)
- [`attach`](#function-attach)
- [`open`](#function-open)
- [`open_group`](#function-open_group)
- [`attach_application`](#function-attach_application)
- [`does_belong_to_dev_tool`](#function-does_belong_to_dev_tool)

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

### attach_with_gesture

```rust
fn attach_with_gesture(root: &TopLevel, gesture: KeyGesture) -> Rc<dyn IDisposable>
```

C# `Attach(TopLevel root, KeyGesture gesture)`: DevTools opens on `gesture` in `root`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L30)

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

### attach

```rust
fn attach(root: &TopLevel, options: Rc<DevToolsOptions>) -> Rc<dyn IDisposable>
```

C# `Attach(TopLevel root, DevToolsOptions options)`: DevTools opens on the gesture of
`options` in `root`. Disposing the result detaches it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L36)

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

### open

```rust
fn open(root: &TopLevel, options: &Rc<DevToolsOptions>) -> Rc<dyn IDisposable>
```

C# `Open(TopLevel root, DevToolsOptions options)`: opens DevTools for `root`. Disposing
the result closes its window.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L56)

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

### open_group

```rust
fn open_group(group: Rc<dyn IDevToolsTopLevelGroup>, options: &Rc<DevToolsOptions>) -> Rc<dyn IDisposable>
```

C# `Open(IDevToolsTopLevelGroup group, DevToolsOptions options)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L66)

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

### attach_application

```rust
fn attach_application(application: &ferroui_controls::Application, options: Rc<DevToolsOptions>) -> Rc<dyn IDisposable>
```

C# `Attach(Application application, DevToolsOptions options)`: DevTools opens on the
gesture of `options` in any window of `application`. Disposing the result detaches it and
closes the window it opened.
## Panics
When the application does not have a classic desktop lifetime.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L76)

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

### does_belong_to_dev_tool

```rust
fn does_belong_to_dev_tool(v: &Visual) -> bool
```

C# `DoesBelongToDevTool(this Visual v)`: whether `v` is in a DevTools window, or in a
popup of one. A visual that is in no top level belongs to DevTools, as upstream.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/dev_tools.rs#L218)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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