pub struct CrashReporterOptions { /* private fields */ }Expand description
Bounded configuration for CrashReporter::install.
Implementations§
Source§impl CrashReporterOptions
impl CrashReporterOptions
Sourcepub fn new(app: AppInfo) -> Self
pub fn new(app: AppInfo) -> Self
Defaults: <AppPaths::log_dir>/crashes, 16 retained reports, 64 KiB per report,
environment-controlled backtraces, and native fatal-signal capture enabled.
Sourcepub fn directory(self, directory: impl Into<PathBuf>) -> Self
pub fn directory(self, directory: impl Into<PathBuf>) -> Self
Override the report directory. The path must be absolute.
Sourcepub fn max_reports(self, maximum: usize) -> Result<Self>
pub fn max_reports(self, maximum: usize) -> Result<Self>
Retain at most maximum reports, capped at MAX_CRASH_REPORTS.
Sourcepub fn max_report_bytes(self, maximum: usize) -> Result<Self>
pub fn max_report_bytes(self, maximum: usize) -> Result<Self>
Write at most maximum bytes per report, capped at MAX_CRASH_REPORT_BYTES.
Sourcepub fn extra_parameter(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Result<Self>
pub fn extra_parameter( self, key: impl Into<String>, value: impl Into<String>, ) -> Result<Self>
Add one bounded extra parameter recorded in every report.
Sourcepub fn upload_endpoint(self, endpoint: impl Into<String>) -> Result<Self>
pub fn upload_endpoint(self, endpoint: impl Into<String>) -> Result<Self>
Remember a default HTTPS upload endpoint for CrashReporter::upload_pending.
Sourcepub fn backtrace(self, policy: BacktracePolicy) -> Self
pub fn backtrace(self, policy: BacktracePolicy) -> Self
Choose whether panic reports carry a backtrace.
Sourcepub fn capture_signals(self, capture: bool) -> Self
pub fn capture_signals(self, capture: bool) -> Self
Disable the native fatal-signal handler and keep only the Rust panic hook.
Trait Implementations§
Source§impl Clone for CrashReporterOptions
impl Clone for CrashReporterOptions
Auto Trait Implementations§
impl Forget for CrashReporterOptions
impl Freeze for CrashReporterOptions
impl Move for CrashReporterOptions
impl RefUnwindSafe for CrashReporterOptions
impl Send for CrashReporterOptions
impl Sync for CrashReporterOptions
impl Unpin for CrashReporterOptions
impl UnsafeUnpin for CrashReporterOptions
impl UnwindSafe for CrashReporterOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more