I'm trying to display Reports in an app of mine (using ImGUI), and I'm having trouble accessing the data hidden inside the Report. For example, I'd like to access the backtrace and spantrace (preferably as raw structs not strings), and then do things to make them appear in the UI.
I can't access these on the Report object because it doesn't provide access to any.
This only lets me access the SpanTrace and BackTrace though, but not the location (file) or any Sections. I think I might be able to get the location form the BackTrace, but I'm not sure since I haven't used that crate directly before. Also, downcasting like this isn't good, because what if the handler isn't the default eyre handler but something else, then my code completely breaks.
Any help would be much appreciated (especially if I'm barking up the wrong tree and looking in the wrong spot)
I'm trying to display Reports in an app of mine (using ImGUI), and I'm having trouble accessing the data hidden inside the Report. For example, I'd like to access the backtrace and spantrace (preferably as raw structs not strings), and then do things to make them appear in the UI.
I can't access these on the
Report
object because it doesn't provide access to any.One solution is to downcast to a concrete type:
This only lets me access the SpanTrace and BackTrace though, but not the location (file) or any
Sections
. I think I might be able to get the location form the BackTrace, but I'm not sure since I haven't used that crate directly before. Also, downcasting like this isn't good, because what if the handler isn't the defaulteyre
handler but something else, then my code completely breaks.Any help would be much appreciated (especially if I'm barking up the wrong tree and looking in the wrong spot)