# RestartSupervisor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-hot-patch/restart/struct-restartsupervisor/

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

```rust
struct RestartSupervisor
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L137)

## Members

- [`new`](#function-new)
- [`current_id`](#function-current_id)
- [`current_is_running`](#function-current_is_running)
- [`supersede`](#function-supersede)
- [`build`](#function-build)
- [`poll_build`](#function-poll_build)
- [`launch`](#function-launch)
- [`poll_replacement`](#function-poll_replacement)
- [`commit`](#function-commit)

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

### new

```rust
fn new(current: Child) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L145)

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

### current_id

```rust
fn current_id(self: &Self) -> u32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L155)

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

### current_is_running

```rust
fn current_is_running(self: &mut Self) -> io::Result<bool>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L158)

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

### supersede

```rust
fn supersede(self: &mut Self, revision: u64) -> io::Result<()>
```

Marks all earlier build/startup work stale without interrupting the running application.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L162)

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

### build

```rust
fn build(self: &mut Self, revision: u64, command: &mut Command) -> io::Result<()>
```

Command must build into an isolated output path; never overwrite the running executable.
Configure stdout/stderr as files or inherited streams, not unconsumed pipes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L174)

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

### poll_build

```rust
fn poll_build(self: &mut Self) -> io::Result<Option<BuiltRevision>>
```

None means the build is still running. Failure and supersession never retire the old process.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L189)

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

### launch

```rust
fn launch(self: &mut Self, ticket: BuiltRevision, command: &mut Command, state: &RestartState, timeout: Duration) -> io::Result<()>
```

The supplied command must run the artifact produced by the ticket's build.
State is captured after building, so edits made while the compiler runs are retained.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L216)

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

### poll_replacement

```rust
fn poll_replacement(self: &mut Self) -> io::Result<ReplacementStatus>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L251)

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

### commit

```rust
fn commit(self: &mut Self) -> io::Result<()>
```

Retires the old process only after an explicit successful startup acknowledgement.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotPatch/restart.rs#L274)

## Trait implementations

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

## Availability

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