Total-order comparison for `DescriptorId` since the cluster type does not derive `Ord` (only `Hash + Eq`). We define our own by `(kind discriminant, tenant_id, name)`.
(a: &DescriptorId, b: &DescriptorId)
| 101 | /// type does not derive `Ord` (only `Hash + Eq`). We define our |
| 102 | /// own by `(kind discriminant, tenant_id, name)`. |
| 103 | fn cmp_id(a: &DescriptorId, b: &DescriptorId) -> std::cmp::Ordering { |
| 104 | (a.kind as u8, a.tenant_id, &a.name).cmp(&(b.kind as u8, b.tenant_id, &b.name)) |
| 105 | } |
| 106 | |
| 107 | #[cfg(test)] |
| 108 | mod tests { |