1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate::{file::FileSpan, *};
use rslint_text_edit::Indel;
use std::ops::Range;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct CodeSuggestion {
pub substitution: SuggestionChange,
pub span: FileSpan,
pub applicability: Applicability,
pub msg: String,
pub style: SuggestionStyle,
pub labels: Vec<Range<usize>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum SuggestionChange {
Indels(Vec<Indel>),
String(String),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum SuggestionStyle {
DontShow,
HideCode,
Inline,
Full,
}