summaryrefslogtreecommitdiff
path: root/rola-utils/space-system/src/space/error.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-19 01:40:38 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-19 01:40:38 +0800
commit1e9c97c21f8a4e55420712b054895ff8b4f9a849 (patch)
treec6bd37889deb54c024f974f368a9a7d654cad822 /rola-utils/space-system/src/space/error.rs
parente078163c7cdbbf226c18d3e3afa7268a2878e18b (diff)
feat(rola-bucket): add bucket bind managementHEADmaster
Implement bucket bind CRUD operations and config loading, along with CLI integration for listing, setting, and removing bucket bindings.
Diffstat (limited to 'rola-utils/space-system/src/space/error.rs')
-rw-r--r--rola-utils/space-system/src/space/error.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/rola-utils/space-system/src/space/error.rs b/rola-utils/space-system/src/space/error.rs
index 8e85010..f039698 100644
--- a/rola-utils/space-system/src/space/error.rs
+++ b/rola-utils/space-system/src/space/error.rs
@@ -1,3 +1,5 @@
+use serde::Serialize;
+
#[derive(thiserror::Error, Debug)]
pub enum SpaceError {
#[error("Space not found")]
@@ -19,6 +21,15 @@ pub enum SpaceError {
ConfigFileAlreadyExist,
}
+impl Serialize for SpaceError {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(&self.to_string())
+ }
+}
+
impl PartialEq for SpaceError {
fn eq(&self, other: &Self) -> bool {
match (self, other) {