Register a new field index. Idempotent — safe to call multiple times for the same field (subsequent calls are no-ops).
(&mut self, field: impl Into<String>, kind: PayloadIndexKind)
| 259 | /// Register a new field index. Idempotent — safe to call multiple times for |
| 260 | /// the same field (subsequent calls are no-ops). |
| 261 | pub fn add_index(&mut self, field: impl Into<String>, kind: PayloadIndexKind) { |
| 262 | let field = field.into(); |
| 263 | self.indexes |
| 264 | .entry(field.clone()) |
| 265 | .or_insert_with(|| PayloadIndex::new(field, kind)); |
| 266 | } |
| 267 | |
| 268 | /// Returns `true` if any index is registered. |
| 269 | pub fn is_empty(&self) -> bool { |