summaryrefslogtreecommitdiff
path: root/systems/_framework/src/space
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-11 14:49:20 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-11 14:49:20 +0800
commita6b38c2918ece9d763a1eb1d581268d94b2bdcf0 (patch)
tree44949f9903213e62f328570b7d8343183d64de7a /systems/_framework/src/space
parent47e0ffd50427440696c245814517e4f5fa94ed83 (diff)
Add framework crate
Diffstat (limited to 'systems/_framework/src/space')
-rw-r--r--systems/_framework/src/space/error.rs20
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),
+ }
+ }
+}