@@ -970,8 +970,7 @@ pub use self::span::Span;
970970pub use tracing_attributes:: instrument;
971971
972972#[ macro_use]
973- #[ doc( hidden) ]
974- pub mod macros;
973+ mod macros;
975974
976975pub mod collect;
977976pub mod dispatch;
@@ -1178,6 +1177,66 @@ pub mod __macro_support {
11781177 }
11791178 }
11801179 }
1180+
1181+ pub mod __tracing_capture_value_by {
1182+ /// Autoref specialization level 0 for `__tracing_capture_value!`
1183+ ///
1184+ /// /!\ WARNING: This is *not* a stable API! /!\
1185+ /// This type, and all code contained in the `__macro_support` module, is
1186+ /// a *private* API of `tracing`. It is exposed publicly because it is used
1187+ /// by the `tracing` macros, but it is not part of the stable versioned API.
1188+ /// Breaking changes to this module may occur in small-numbered versions
1189+ /// without warning.
1190+ #[ cfg( all( tracing_unstable, feature = "valuable" ) ) ]
1191+ pub trait TracingCaptureValueByValuable {
1192+ fn __tracing_capture_value ( & self ) -> & dyn crate :: field:: Value ;
1193+ }
1194+
1195+ #[ cfg( all( tracing_unstable, feature = "valuable" ) ) ]
1196+ impl < T : valuable:: Valuable > TracingCaptureValueByValuable for T {
1197+ fn __tracing_capture_value ( & self ) -> valuable:: Value < ' _ > {
1198+ crate :: field:: valuable ( self )
1199+ }
1200+ }
1201+
1202+ /// Autoref specialization level 1 for `__tracing_capture_value!`
1203+ ///
1204+ /// /!\ WARNING: This is *not* a stable API! /!\
1205+ /// This type, and all code contained in the `__macro_support` module, is
1206+ /// a *private* API of `tracing`. It is exposed publicly because it is used
1207+ /// by the `tracing` macros, but it is not part of the stable versioned API.
1208+ /// Breaking changes to this module may occur in small-numbered versions
1209+ /// without warning.
1210+ #[ cfg( not( all( tracing_unstable, feature = "valuable" ) ) ) ]
1211+ pub trait TracingCaptureValueByValue {
1212+ fn __tracing_capture_value ( & self ) -> & dyn crate :: field:: Value ;
1213+ }
1214+
1215+ #[ cfg( not( all( tracing_unstable, feature = "valuable" ) ) ) ]
1216+ impl < T : crate :: field:: Value > TracingCaptureValueByValue for & T {
1217+ fn __tracing_capture_value ( & self ) -> & dyn crate :: field:: Value {
1218+ self
1219+ }
1220+ }
1221+
1222+ /// Autoref specialization level 2 for `__tracing_capture_value!`
1223+ ///
1224+ /// /!\ WARNING: This is *not* a stable API! /!\
1225+ /// This type, and all code contained in the `__macro_support` module, is
1226+ /// a *private* API of `tracing`. It is exposed publicly because it is used
1227+ /// by the `tracing` macros, but it is not part of the stable versioned API.
1228+ /// Breaking changes to this module may occur in small-numbered versions
1229+ /// without warning.
1230+ pub trait TracingCaptureValueByDebug {
1231+ fn __tracing_capture_value ( & self ) -> & dyn crate :: field:: Value ;
1232+ }
1233+
1234+ impl < T : core:: fmt:: Debug > TracingCaptureValueByDebug for & & T {
1235+ fn __tracing_capture_value ( & self ) -> & dyn crate :: field:: Value {
1236+ crate :: field:: debug_ref ( self )
1237+ }
1238+ }
1239+ }
11811240}
11821241
11831242mod sealed {
0 commit comments