use crate::protocol::display::Line;
use crate::{
Consumer, Dep, Explanation, Exposed, FileChange, HistoryEntry, ImportSite, Importer, Intent,
Match, Notice, Occurrence, OutlineItem, Respelling, Site, Unreferenced,
};
use vvv_core::RelPath;
#[derive(Debug, Clone)]
pub enum Block {
Title(String),
Heading(String),
Declarations(Vec<Match>),
Matches(Vec<Match>),
Verdicts {
occurrences: Vec<Occurrence>,
plan: Option<ReferencePlan>,
},
Imports {
unresolved: Vec<ImportSite>,
unused: Vec<ImportSite>,
redundant: Vec<ImportSite>,
},
DepGroups {
path: RelPath,
imports: Vec<Dep>,
own: Option<String>,
},
Importers(Vec<Importer>),
Explanation(Box<Explanation>),
Outline {
path: RelPath,
items: Vec<OutlineItem>,
},
Sites(Vec<Site>),
SymbolMoveCandidates(Vec<crate::SymbolMoveCandidate>),
Locations(Vec<crate::DefinitionLocation>),
Relationships(Vec<crate::Relationship>),
Dead(Vec<Unreferenced>),
Exposed(Vec<Exposed>),
Consumers(Vec<Consumer>),
History(Vec<HistoryEntry>),
Batch(Vec<Intent>),
Undo {
moves: Vec<(RelPath, RelPath)>,
restored: Vec<RelPath>,
},
Line(Line),
Summary(Line),
Note(Note),
Changes {
state: crate::MutationState,
files: Vec<FileChange>,
},
Moved {
state: crate::MutationState,
files: Vec<FileChange>,
respellings: Vec<Respelling>,
notices: Vec<Notice>,
},
Blank,
}
#[derive(Debug, Clone)]
pub struct ReferencePlan {
pub state: crate::MutationState,
pub files: Vec<FileChange>,
}
#[derive(Debug, Clone)]
pub enum Note {
Hint(String),
Warning(Line),
}
pub(crate) struct MoveCounts {
pub(crate) respellings: usize,
pub(crate) structural: usize,
pub(crate) notices: usize,
pub(crate) files: usize,
}