chroma_types/tenant.rs
1use crate::chroma_proto::TenantLastCompactionTime;
2
3pub struct Tenant {
4 pub id: String,
5 pub last_compaction_time: i64,
6}
7
8impl TryFrom<TenantLastCompactionTime> for Tenant {
9 type Error = ();
10
11 fn try_from(proto_tenant: TenantLastCompactionTime) -> Result<Self, Self::Error> {
12 Ok(Tenant {
13 id: proto_tenant.tenant_id,
14 last_compaction_time: proto_tenant.last_compaction_time,
15 })
16 }
17}