# DevToolsServer

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

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

```rust
struct DevToolsServer
```

An explicitly started localhost listener. Keep the handle on the UI thread for the lifetime
of the endpoint. Dropping it stops the listener, closes clients and removes highlights/logging.
The UI thread does work only for the requests of clients: each is posted to its dispatcher.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DevTools/server.rs#L114)

## Members

- [`start`](#function-start)
- [`with_browser`](#function-with_browser)
- [`local_addr`](#function-local_addr)
- [`register`](#function-register)

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

### start

```rust
fn start(port: u16) -> io::Result<Self>
```

Start on 127.0.0.1. Port zero requests an available port. Must run on the UI thread after
platform setup; windows opened later are discovered automatically.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DevTools/server.rs#L125)

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

### with_browser

```rust
fn with_browser(port: u16, browser: Browser) -> io::Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DevTools/server.rs#L128)

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

### local_addr

```rust
fn local_addr(self: &Self) -> SocketAddr
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DevTools/server.rs#L205)

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

### register

```rust
fn register(self: &Self, root: &ferroui_base::Ref<ferroui_controls::TopLevel>) -> String
```

Register a window from a custom lifetime, on the UI thread.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DevTools/server.rs#L209)

## 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`
- `Same`
- `VZip<V>`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- `Drop`

## Availability

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