# PreviewStageBoard

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer/struct-previewstageboard/

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

```rust
struct PreviewStageBoard
```

One UI-thread collection of native comparison stages across the host's open
document buffers. It never owns document history or performs authored mutations.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L558)

## Members

- [`new`](#function-new)
- [`epoch`](#function-epoch)
- [`active`](#function-active)
- [`prototype`](#function-prototype)
- [`set_prototype`](#function-set_prototype)
- [`stages`](#function-stages)
- [`stage`](#function-stage)
- [`control`](#function-control)
- [`sync_sources`](#function-sync_sources)
- [`add`](#function-add)
- [`update`](#function-update)
- [`set_active`](#function-set_active)
- [`duplicate`](#function-duplicate)
- [`remove`](#function-remove)
- [`move_stage`](#function-move_stage)
- [`set_paused`](#function-set_paused)
- [`refresh`](#function-refresh)
- [`refresh_all`](#function-refresh_all)
- [`compare_variants`](#function-compare_variants)
- [`add_configurations`](#function-add_configurations)
- [`manifest`](#function-manifest)
- [`snapshot`](#function-snapshot)
- [`restore_manifest`](#function-restore_manifest)
- [`restore`](#function-restore)
- [`retarget_source`](#function-retarget_source)
- [`runtime_tree`](#function-runtime_tree)
- [`prototype_hotspot_bounds`](#function-prototype_hotspot_bounds)
- [`source_is_current`](#function-source_is_current)
- [`frame_is_current`](#function-frame_is_current)
- [`dependencies_are_current`](#function-dependencies_are_current)
- [`refresh_runtime_mappings`](#function-refresh_runtime_mappings)
- [`refresh_runtime_mapping`](#function-refresh_runtime_mapping)
- [`selection_token`](#function-selection_token)
- [`hit_test_selection`](#function-hit_test_selection)
- [`resolve_selection`](#function-resolve_selection)

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

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L577)

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

### epoch

```rust
fn epoch(self: &Self) -> u64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L591)

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

### active

```rust
fn active(self: &Self) -> Option<PreviewStageId>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L594)

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

### prototype

```rust
fn prototype(self: &Self) -> PreviewPrototype
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L598)

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

### set_prototype

```rust
fn set_prototype(self: &mut Self, prototype: PreviewPrototype) -> Result<(), String>
```

Replace local interaction descriptors without rebuilding native stages or
mutating authored source. Rejected graphs leave the accepted board intact.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L604)

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

### stages

```rust
fn stages(self: &Self) -> Vec<PreviewStageInfo>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L613)

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

### stage

```rust
fn stage(self: &Self, id: PreviewStageId) -> Option<PreviewStageInfo>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L617)

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

### control

```rust
fn control(self: &Self, id: PreviewStageId) -> Option<Ref<Control>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L624)

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

### sync_sources

```rust
fn sync_sources(self: &mut Self, active_uri: &str, sources: Vec<PreviewStageSource>, options: PreviewHostOptions, options_epoch: u64) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L670)

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

### add

```rust
fn add(self: &mut Self, configuration: PreviewStageConfiguration) -> Result<PreviewStageId, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L739)

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

### update

```rust
fn update(self: &mut Self, id: PreviewStageId, configuration: PreviewStageConfiguration) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L770)

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

### set_active

```rust
fn set_active(self: &mut Self, id: PreviewStageId) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L809)

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

### duplicate

```rust
fn duplicate(self: &mut Self, id: PreviewStageId) -> Result<PreviewStageId, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L818)

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

### remove

```rust
fn remove(self: &mut Self, id: PreviewStageId) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L827)

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

### move_stage

```rust
fn move_stage(self: &mut Self, id: PreviewStageId, index: usize) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L843)

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

### set_paused

```rust
fn set_paused(self: &mut Self, id: PreviewStageId, paused: bool) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L856)

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

### refresh

```rust
fn refresh(self: &mut Self, id: PreviewStageId) -> Result<(), String>
```

Explicit refresh also works while automatic updates are paused.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L863)

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

### refresh_all

```rust
fn refresh_all(self: &mut Self) -> Vec<(PreviewStageId, String)>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L867)

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

### compare_variants

```rust
fn compare_variants(self: &mut Self, id: PreviewStageId, variants: Vec<(String, PreviewEnvironment)>) -> Result<Vec<PreviewStageId>, String>
```

Create variants atomically with respect to descriptor validation and capacity.
Each native failure remains isolated to its resulting card.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L876)

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

### add_configurations

```rust
fn add_configurations(self: &mut Self, configurations: Vec<PreviewStageConfiguration>) -> Result<Vec<PreviewStageId>, String>
```

Add a bounded comparison batch. Descriptor validation and capacity are
checked for the entire batch before any native factory can be called.
Individual native loading failures remain visible on their own cards.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L899)

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

### manifest

```rust
fn manifest(self: &Self) -> PreviewStageManifest
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L917)

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

### snapshot

```rust
fn snapshot(self: &Self) -> PreviewStageSnapshot
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L942)

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

### restore_manifest

```rust
fn restore_manifest(self: &mut Self, manifest: PreviewStageManifest) -> Result<(), String>
```

Imported IDs are freshly allocated so callbacks from a retired board cannot
address a new card. Validation finishes before any old stage is removed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L948)

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

### restore

```rust
fn restore(self: &mut Self, snapshot: PreviewStageSnapshot) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L977)

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

### retarget_source

```rust
fn retarget_source(self: &mut Self, old_uri: &str, new_uri: &str) -> Result<(), String>
```

Call after a successful Save As, before synchronizing the new URI snapshots.
The old graph stays visible but immediately loses source-selection authority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L983)

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

### runtime_tree

```rust
fn runtime_tree(self: &Self, id: PreviewStageId, kind: TreeKind) -> Result<Vec<RuntimeNode>, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1010)

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

### prototype_hotspot_bounds

```rust
fn prototype_hotspot_bounds(self: &Self, id: PreviewStageId, anchor: &PreviewSourceAnchor) -> Result<ferroui_base::Rect, String>
```

Resolve one authored hotspot against the exact accepted native graph. The
returned axis-aligned rectangle uses stage logical coordinates and is clipped
to the stage viewport and native ancestor clips. Call again immediately before
activation: native scrolling and layout can move a target without source edits.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1043)

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

### source_is_current

```rust
fn source_is_current(self: &Self, id: PreviewStageId, uri: &str, document: &Document, pending: bool, options_epoch: u64) -> bool
```

Validate a supplied current buffer without synchronizing, constructing or
refreshing anything. Read-only automation uses this before exposing source
identities when an editor change precedes the board's next UI refresh.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1169)

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

### frame_is_current

```rust
fn frame_is_current(self: &Self, id: PreviewStageId, uri: &str, document: &Document, pending: bool, options_epoch: u64) -> bool
```

Check whether an accepted native frame represents these exact current
buffers, including a paused frame explicitly refreshed at this revision.
This does not grant source-selection or application-input authority.
Hosts must also validate all their current dependency buffers through
`dependencies_are_current` before publishing an image of the frame.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1188)

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

### dependencies_are_current

```rust
fn dependencies_are_current(self: &Self, id: PreviewStageId, sources: &[PreviewStageSource]) -> bool
```

Read-only validation against all current host buffers, including native
include dependencies changed before the board's next synchronization.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1224)

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

### refresh_runtime_mappings

```rust
fn refresh_runtime_mappings(self: &mut Self)
```

Refresh identities after native attachment or template/item realization.
This neither reloads source nor resets a stage's temporary interaction state.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1255)

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

### refresh_runtime_mapping

```rust
fn refresh_runtime_mapping(self: &mut Self, id: PreviewStageId) -> Result<(), String>
```

Refresh only the presented screen. Prototype playback can retain many
screens without traversing every hidden graph on each native layout tick.
The same accepted-source/dependency checks apply as the whole-board update.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1264)

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

### selection_token

```rust
fn selection_token(self: &Self, id: PreviewStageId, inspector_id: u64) -> Result<PreviewStageSelectionToken, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1293)

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

### hit_test_selection

```rust
fn hit_test_selection(self: &Self, id: PreviewStageId, point: Point) -> Result<PreviewStageSelectionToken, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1328)

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

### resolve_selection

```rust
fn resolve_selection(self: &Self, token: &PreviewStageSelectionToken) -> Result<PreviewStageSelection, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_stages.rs#L1362)

## 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`
- `Default`
- `Drop`

## Availability

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