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 21a98a3 commit 81ee539Copy full SHA for 81ee539
rust-runtime/aws-smithy-observability/src/meter.rs
@@ -19,7 +19,13 @@ pub trait ProvideMeter: Send + Sync + Debug + 'static {
19
fn get_meter(&self, scope: &'static str, attributes: Option<&Attributes>) -> Meter;
20
21
/// Downcast to `Any` for type inspection.
22
- fn as_any(&self) -> &dyn std::any::Any;
+ ///
23
+ /// The default implementation returns a reference to `()`, which will fail
24
+ /// any downcast attempts. Implementors should override this method to return
25
+ /// `self` for proper type inspection support.
26
+ fn as_any(&self) -> &dyn std::any::Any {
27
+ &()
28
+ }
29
}
30
31
/// The entry point to creating instruments. A grouping of related metrics.
0 commit comments