Skip to main content

vvv_engine/protocol/intent/
move_file.rs

1use std::path::PathBuf;
2
3use serde::{Deserialize, Serialize};
4
5/// Move a file and make every reference to it follow.
6#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
7pub struct MoveIntent {
8    pub from: PathBuf,
9    pub to: PathBuf,
10}
11
12impl MoveIntent {
13    pub fn new(from: impl Into<PathBuf>, to: impl Into<PathBuf>) -> Self {
14        Self {
15            from: from.into(),
16            to: to.into(),
17        }
18    }
19}