Types can now implement a trace_data function that takes a
TraceData.Observer as an argument, using it cooperatively
to walk it through any properties it wishes to trace.
The TraceData.Observer trait can be implemented by any observer
which wishes to be able to accumulate state during tracing.
Some examples may be printing data, measuring data, or serializing
to various formats that are focused on the same kinds of data primitives.
Inspect can now use tracing to print the data in complex nested objects.
Any type which implements TraceData can now be printed in this way.
Types can now implement a
trace_data
function that takes aTraceData.Observer
as an argument, using it cooperatively to walk it through any properties it wishes to trace.The
TraceData.Observer
trait can be implemented by any observer which wishes to be able to accumulate state during tracing. Some examples may be printing data, measuring data, or serializing to various formats that are focused on the same kinds of data primitives.Inspect
can now use tracing to print the data in complex nested objects. Any type which implementsTraceData
can now be printed in this way.