diff options
Diffstat (limited to 'systems/_framework/src/space')
| -rw-r--r-- | systems/_framework/src/space/error.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/systems/_framework/src/space/error.rs b/systems/_framework/src/space/error.rs new file mode 100644 index 0000000..50e673f --- /dev/null +++ b/systems/_framework/src/space/error.rs @@ -0,0 +1,20 @@ +#[derive(thiserror::Error, Debug)] +pub enum SpaceError { + #[error("Space not found")] + SpaceNotFound, + + #[error("Path format error: {0}")] + PathFormatError(#[from] just_fmt::fmt_path::PathFormatError), + + #[error("IO error: {0}")] + Io(#[from] std::io::Error), +} + +impl PartialEq for SpaceError { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::Io(_), Self::Io(_)) => true, + _ => core::mem::discriminant(self) == core::mem::discriminant(other), + } + } +} |
