Expand description
The code generated by tracers-macros will at runtime require some functionality, both from
within this crate but also from third-party crates like failure. It’s important that the
generated code use our version of these crates, and not be required to add some explicit
dependency itself. So we’ll re-export those dependencies here
Re-export our two dependencies that are actually used by code in user crates generated by
tracers! macro. By re-exporting the crate and not just the types, we ensure the correct
version will be used and spare the user having to add these dependencies themselves. A deeper
discussion around this is ongoing right now at:
https://github.com/rust-lang-nursery/api-guidelines/issues/176
The build.rs will set a feature to indicate if tracing is enabled at all. If not then
there’s no reason to even include this runtime
Re-exports§
Traits§
- Probe
ArgNative Type - The other half of
ProbeArgNativeTypeInfo, which takes a type parameter and thus addsget_default_value. - Probe
ArgType - This trait is defined on any type which is supported as an argument to a probe.
- Probe
ArgWrapper - This trait, a companion to ProbeArgType
, wraps a supported type and on demand converts it to its equivalent C type. For scalar types that are directly supported there is no overhead to this wrapping, but many more complicated types, including Rust string types, need additional logic to produce a NULL-terminated byte array.
Functions§
- wrap
- Helper function to wrap a probe arg in its correspondong wrapper without contorting one’s fingers typing angle brackets