1use super::safepath::SafePath;
2
3#[derive(Debug, Copy, Clone, Default)]
8pub enum ApplyMode {
9 #[default]
10 DryRun,
11 Commit,
12}
13
14#[derive(Clone, Debug)]
16pub struct LinkRequest {
17 pub source: SafePath,
18 pub target: SafePath,
19}
20
21#[derive(Clone, Debug)]
23pub struct RestoreRequest {
24 pub target: SafePath,
25}
26
27#[derive(Clone, Debug, Default)]
29pub struct PlanInput {
30 pub link: Vec<LinkRequest>,
31 pub restore: Vec<RestoreRequest>,
32}
33
34#[derive(Clone, Debug, PartialEq)]
36pub enum Action {
37 EnsureSymlink { source: SafePath, target: SafePath },
38 RestoreFromBackup { target: SafePath },
39}
40
41#[derive(Clone, Debug, Default)]
43pub struct Plan {
44 pub actions: Vec<Action>,
45}