diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-23 06:01:58 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-23 06:01:58 +0800 |
| commit | aee17b68b2b213553cd06406a3a5713ec91f374d (patch) | |
| tree | c808690e98d1e056249ac9775326cc6845b73acc /src/legacy_json_output/analyzer_result.rs | |
| parent | fa51df5d748d9d9e3927c56d33e1437a05a8abb1 (diff) | |
Fix typo in legacy_json_output module name
Diffstat (limited to 'src/legacy_json_output/analyzer_result.rs')
| -rw-r--r-- | src/legacy_json_output/analyzer_result.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/legacy_json_output/analyzer_result.rs b/src/legacy_json_output/analyzer_result.rs new file mode 100644 index 0000000..bb6af56 --- /dev/null +++ b/src/legacy_json_output/analyzer_result.rs @@ -0,0 +1,35 @@ +use std::path::PathBuf; + +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "PascalCase")] +pub struct AnalyzerJsonResult { + pub created: Vec<PathBuf>, + pub lost: Vec<PathBuf>, + pub erased: Vec<PathBuf>, + pub moved: Vec<MovedItem>, + pub modified: Vec<ModifiedItem>, +} + +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[serde(rename_all = "PascalCase")] +pub enum ModifiedType { + Modified, + ModifiedButBaseVersionMismatch, + ModifiedButNotHeld, +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "PascalCase")] +pub struct MovedItem { + pub from: PathBuf, + pub to: PathBuf, +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "PascalCase")] +pub struct ModifiedItem { + pub path: PathBuf, + pub modification_type: ModifiedType, +} |
