8ff7604502
* chore: Major refactoring Still needs a massive go-over because there shouldn't be anything referencing tauri in any of the workspaces except the original one. Process manager has been refactored as an example Signed-off-by: quexeky <git@quexeky.dev> * fix: Remote tauri dependency from process Signed-off-by: quexeky <git@quexeky.dev> * refactor: Improvements to src-tauri Signed-off-by: quexeky <git@quexeky.dev> * refactor: Builds, but some logic still left to move back Signed-off-by: quexeky <git@quexeky.dev> * refactor: Finish refactor Signed-off-by: quexeky <git@quexeky.dev> * chore: Run cargo clippy && cargo fmt Signed-off-by: quexeky <git@quexeky.dev> * refactor: Move everything into src-tauri Signed-off-by: quexeky <git@quexeky.dev> --------- Signed-off-by: quexeky <git@quexeky.dev>
28 lines
593 B
Rust
28 lines
593 B
Rust
use std::fmt::Display;
|
|
|
|
use serde_with::SerializeDisplay;
|
|
|
|
#[derive(Debug, SerializeDisplay, Clone, Copy)]
|
|
|
|
pub enum BackupError {
|
|
InvalidSystem,
|
|
|
|
NotFound,
|
|
|
|
ParseError,
|
|
}
|
|
|
|
impl Display for BackupError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
let s = match self {
|
|
BackupError::InvalidSystem => "Attempted to generate path for invalid system",
|
|
|
|
BackupError::NotFound => "Could not generate or find path",
|
|
|
|
BackupError::ParseError => "Failed to parse path",
|
|
};
|
|
|
|
write!(f, "{}", s)
|
|
}
|
|
}
|