Struct minidump_processor::ProcessorOptions
source · #[non_exhaustive]pub struct ProcessorOptions<'a> {
pub evil_json: Option<&'a Path>,
pub recover_function_args: bool,
pub stat_reporter: Option<&'a PendingProcessorStats>,
}
Expand description
Configuration of the processor’s exact behaviour.
This can be used to either:
- enable extra features that are disabled by default
- lock in the features you want enabled to minimize future changes
All fields are pub
, but the type is non_exhaustive
.
Recommended usage is to call one of the constructors to get a baseline
set of features, and then manually set any values you particularly care about.
If we decide an unstable feature exposed by these flags is a bad idea, we may remove its functionality and turn it into a noop, but the flag will remain to avoid breaking code. Similarly, if a feature seems to be too bloated, its implementation may be hidden behind a cargo feature flag, producing a similar result if that feature is statically disabled.
In either of these cases, a warn
diagnostic will be emitted if you
try to use request a feature whose implementation does not exist.
process_minidump
uses ProcessorOptions::stable_basic
, which
is also exposed as Default::default
.
§Example:
use minidump_processor::ProcessorOptions;
// Happy with the default-enabled features
let mut options = ProcessorOptions::stable_basic();
// But specifically want this cool unstable feature
options.recover_function_args = true;
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.evil_json: Option<&'a Path>
[UNSTABLE] The evil “raw json” mozilla’s legacy infrastructure relies on.
Please don’t use this. If you have to use this, you know who you are.
recover_function_args: bool
[UNSTABLE] Whether to try to heuristically recover function arguments in backtraces.
Currently this only work for x86, and assumes everything is either cdecl or thiscall (inferred from whether the symbol name looks like a static function or a method).
stat_reporter: Option<&'a PendingProcessorStats>
Set this value to subscribe to live statistics during the processing.
See PendingProcessorStats
and PendingProcessorStatSubscriptions
.
Implementations§
source§impl ProcessorOptions<'_>
impl ProcessorOptions<'_>
sourcepub fn stable_basic() -> Self
pub fn stable_basic() -> Self
“Do the normal stuff everyone should want”
evil_json: None
recover_function_args: false
Unlike stable_all, you shouldn’t expect this to change its results much.
It will specifically always try to:
- Perform full backtraces and symbolication of every thread.
- Produce detailed system info (OS, Cpu, Versions…)
- Produce detailed crash info (Crashing thread, crash address, formatted error…)
- List loaded and unloaded modules
sourcepub fn stable_all() -> Self
pub fn stable_all() -> Self
“Turn all the stable features on”
evil_json: None
recover_function_args: false
(At this precise moment this is identical to stable_basic, but may diverge as we introduce more features.)
Everything included by stable_basic, but willing to enable more interesting features and spend extra time trying to find extra insights. This is the default place that unstable features will “graduate” to when they’re deemed good enough.
sourcepub fn unstable_all() -> Self
pub fn unstable_all() -> Self
“Turn EVERYTHING on, even the experimental stuff!”
evil_json: None
recover_function_args: true
(evil_json is still “disabled” because you need to give it needs a path.)
Some of this stuff can be really jank, use at your own risk!
Trait Implementations§
source§impl<'a> Clone for ProcessorOptions<'a>
impl<'a> Clone for ProcessorOptions<'a>
source§fn clone(&self) -> ProcessorOptions<'a>
fn clone(&self) -> ProcessorOptions<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more