# SnapIndex

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

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

```rust
struct SnapIndex
```

Immutable, sorted guide geometry for repeated pointer updates. Prepare once
when a gesture begins; each query examines only the nearest two guides for
each anchor, independent of the number of objects on the artboard.

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

## Members

- [`snap`](#function-snap)
- [`snap_with`](#function-snap_with)

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

### snap

```rust
fn snap(self: &Self, moving: Rect) -> Result<SnapResult>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L277)

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

### snap_with

```rust
fn snap_with(self: &Self, moving: Rect, grid: Option<f64>, tolerance: f64) -> Result<SnapResult>
```

Reuse the measured geometry after zoom or grid settings change.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L282)

## Trait implementations

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

## Availability

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