Skip to main content

vvv_engine/protocol/
respelling.rs

1use vvv_core::RelPath;
2
3use serde::{Deserialize, Serialize};
4
5use vvv_core::{Position, Span};
6
7/// A reference a move re-spelled in place: where it is, what it said and
8/// what it says now. A preview lists these as one row each instead of a
9/// diff hunk; an edit no respelling accounts for is structural and shows as
10/// a hunk.
11#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
12pub struct Respelling {
13    pub path: RelPath,
14    /// The reference's span before the move — the edit that rewrites it.
15    pub span: Span,
16    pub start: Position,
17    pub from: String,
18    pub to: String,
19}