Struct minidump_processor::ProcessorOptions
source · [−]#[non_exhaustive]pub struct ProcessorOptions<'a> {
pub evil_json: Option<&'a Path>,
pub recover_function_args: bool,
}
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).
Implementations
sourceimpl 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
sourceimpl<'a> Clone for ProcessorOptions<'a>
impl<'a> Clone for ProcessorOptions<'a>
sourcefn clone(&self) -> ProcessorOptions<'a>
fn clone(&self) -> ProcessorOptions<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for ProcessorOptions<'a>
impl<'a> Debug for ProcessorOptions<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ProcessorOptions<'a>
impl<'a> Send for ProcessorOptions<'a>
impl<'a> Sync for ProcessorOptions<'a>
impl<'a> Unpin for ProcessorOptions<'a>
impl<'a> UnwindSafe for ProcessorOptions<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more