From a6b38c2918ece9d763a1eb1d581268d94b2bdcf0 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 11 Mar 2026 14:49:20 +0800 Subject: Add framework crate --- systems/_framework/src/space/error.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 systems/_framework/src/space/error.rs (limited to 'systems/_framework/src/space') 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), + } + } +} -- cgit