pub trait TracerExt {
// Required method
fn trace_stable_enum_type<T>(&mut self, samples: &Samples) -> Result<Format>
where T: StableEnumTrace;
}Expand description
Extension methods on Tracer for tracing enums whose variant tags are
not contiguous starting at zero.
The standard Tracer::trace_type discovers an enum’s variants by probing
0, 1, 2, … until each u32 index has been seen. With Keccak-derived
stable tags those indices are not consecutive (they live in [2^27, 2^28)),
so probing never terminates. This trait delegates to the enum’s
StableEnumTrace impl, which drives tracing variant-by-variant via the
enum’s Serialize impl.
Required Methods§
Sourcefn trace_stable_enum_type<T>(&mut self, samples: &Samples) -> Result<Format>where
T: StableEnumTrace,
fn trace_stable_enum_type<T>(&mut self, samples: &Samples) -> Result<Format>where
T: StableEnumTrace,
Trace every variant of a stable-tagged enum, returning the enum’s
Format for use in Formats::operation, Formats::response,
etc.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.