FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SnapIndex

    struct · ferroui-designer-tools · v0.5.0

    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

    Members

    snap

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

    Source

    snap_with

    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

    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.