CrashpadConfigBuilder

Struct CrashpadConfigBuilder 

Source
pub struct CrashpadConfigBuilder { /* private fields */ }
Expand description

Builder for CrashpadConfig

Implementations§

Source§

impl CrashpadConfigBuilder

Source

pub fn handler_path<P: AsRef<Path>>(self, path: P) -> Self

Set the handler path

Source

pub fn database_path<P: AsRef<Path>>(self, path: P) -> Self

Set the database path

Source

pub fn metrics_path<P: AsRef<Path>>(self, path: P) -> Self

Set the metrics path

Source

pub fn url<S: Into<String>>(self, url: S) -> Self

Set the upload URL

Source

pub fn rate_limit(self, enabled: bool) -> Self

Control upload rate limiting

Limits crash report uploads to one per hour when enabled.

§Platform Behavior
  • Desktop/Linux/Android: Passed as handler process argument
  • iOS/tvOS/watchOS: Currently ignored (hardcoded to false in Crashpad)
§Default

true - Rate limiting enabled

Source

pub fn upload_gzip(self, enabled: bool) -> Self

Control gzip compression for uploads

§Platform Behavior
  • Desktop/Linux/Android: Passed as handler process argument
  • iOS/tvOS/watchOS: Currently ignored (hardcoded to true in Crashpad)
§Default

true - Gzip compression enabled

Source

pub fn periodic_tasks(self, enabled: bool) -> Self

Control periodic database maintenance tasks

§Platform Behavior
  • Desktop/Linux/Android: Passed as handler process argument
  • iOS/tvOS/watchOS: Currently ignored (uses internal pruning thread)
§Default

true - Periodic tasks enabled

Source

pub fn identify_client_via_url(self, enabled: bool) -> Self

Control client identification via URL

§Platform Behavior
  • Desktop/Linux/Android: Passed as handler process argument
  • iOS/tvOS/watchOS: Currently ignored (hardcoded to true in Crashpad)
§Default

true - Client identification enabled

Source

pub fn handler_argument<S: Into<String>>(self, arg: S) -> Self

Add a custom handler argument (advanced usage)

§Platform Behavior
  • Desktop/Linux/Android: Passed to handler process
  • iOS/tvOS/watchOS: Ignored
§Example
let config = CrashpadConfig::builder()
    .handler_argument("--monitor-self")
    .build();
Source

pub fn handler_arguments<I, S>(self, args: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Add multiple handler arguments (advanced usage)

§Platform Behavior
  • Desktop/Linux/Android: Passed to handler process
  • iOS/tvOS/watchOS: Ignored
§Example
let config = CrashpadConfig::builder()
    .handler_arguments(vec!["--monitor-self", "--no-rate-limit"])
    .build();
Source

pub fn build(self) -> CrashpadConfig

Build the configuration

Trait Implementations§

Source§

impl Default for CrashpadConfigBuilder

Source§

fn default() -> CrashpadConfigBuilder

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

Auto Trait Implementations§

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, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.