#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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<'_>

source

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
source

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.

source

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>

source§

fn clone(&self) -> ProcessorOptions<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ProcessorOptions<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ProcessorOptions<'_>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more