Extend the public Registry interface #459
Labels
C-util
Component: utility classes and helpers.
E-simple
Effort: simple.
T-ergonomics
Type: ergonomics.
T-request
Type: request.
Currently the Registry object exposes a limited API: get_or_create, get_handles, visit, delete, clear.
Would you consider adding the following public functions?
get_counter(&self, key: &K) -> Option<S::Counter>
retain_counters(&mut self, f: impl FnMut(&K, &S::Counter) -> bool)
and the corresponding functions for gauges and histograms, that work like
HashMap::get
andHashMap::retain
, respectively.Proposed PR for the
get
functions: #457The text was updated successfully, but these errors were encountered: