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)]
12#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
13pub struct Respelling {
14 pub path: RelPath,
15 /// The reference's span before the move — the edit that rewrites it.
16 pub span: Span,
17 pub start: Position,
18 pub from: String,
19 pub to: String,
20}