We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adc7c4e commit 39344f8Copy full SHA for 39344f8
src/collector.rs
@@ -39,3 +39,9 @@ pub trait Collector: std::fmt::Debug + Send + Sync + 'static {
39
/// Once the [`Collector`] is registered, this method is called on each scrape.
40
fn encode(&self, encoder: DescriptorEncoder) -> Result<(), std::fmt::Error>;
41
}
42
+
43
+impl<T: Collector> Collector for std::sync::Arc<T> {
44
+ fn encode(&self, encoder: DescriptorEncoder) -> Result<(), std::fmt::Error> {
45
+ self.as_ref().encode(encoder)
46
+ }
47
+}
0 commit comments