diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-19 01:40:38 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-19 01:40:38 +0800 |
| commit | 1e9c97c21f8a4e55420712b054895ff8b4f9a849 (patch) | |
| tree | c6bd37889deb54c024f974f368a9a7d654cad822 /rola-utils/space-system/src/space/error.rs | |
| parent | e078163c7cdbbf226c18d3e3afa7268a2878e18b (diff) | |
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.rs | 11 |
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) { |
