Entry count for a specific collection.
(&self, tenant_id: u64, collection: &str)
| 118 | |
| 119 | /// Entry count for a specific collection. |
| 120 | pub fn collection_len(&self, tenant_id: u64, collection: &str) -> usize { |
| 121 | let tkey = table_key(tenant_id, collection); |
| 122 | self.tables.get(&tkey).map(|t| t.len()).unwrap_or(0) |
| 123 | } |
| 124 | |
| 125 | /// Approximate memory usage for a specific collection. Sums the |
| 126 | /// hash table's own `mem_usage()` estimate; returns 0 if no table |