liboxen/model/namespace.rs
1use serde::{Deserialize, Serialize};
2use utoipa::ToSchema;
3
4#[derive(Deserialize, Serialize, Debug, Clone, ToSchema)]
5pub struct Namespace {
6 pub name: String,
7 pub storage_usage_gb: f64,
8}
9
10impl std::fmt::Display for Namespace {
11 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 write!(f, "{} ({} GB)", self.name, self.storage_usage_gb)
13 }
14}
15
16impl std::error::Error for Namespace {}