pub struct CrashInfoBuilder {Show 15 fields
pub counters: Option<HashMap<String, i64>>,
pub error: ErrorDataBuilder,
pub experimental: Option<Experimental>,
pub files: Option<HashMap<String, Vec<String>>>,
pub fingerprint: Option<String>,
pub incomplete: Option<bool>,
pub log_messages: Option<Vec<String>>,
pub metadata: Option<Metadata>,
pub os_info: Option<OsInfo>,
pub proc_info: Option<ProcInfo>,
pub sig_info: Option<SigInfo>,
pub span_ids: Option<Vec<Span>>,
pub timestamp: Option<DateTime<Utc>>,
pub trace_ids: Option<Vec<Span>>,
pub uuid: Uuid,
}Fields§
§counters: Option<HashMap<String, i64>>§error: ErrorDataBuilder§experimental: Option<Experimental>§files: Option<HashMap<String, Vec<String>>>§fingerprint: Option<String>§incomplete: Option<bool>§log_messages: Option<Vec<String>>§metadata: Option<Metadata>§os_info: Option<OsInfo>§proc_info: Option<ProcInfo>§sig_info: Option<SigInfo>§span_ids: Option<Vec<Span>>§timestamp: Option<DateTime<Utc>>§trace_ids: Option<Vec<Span>>§uuid: UuidImplementations§
Source§impl CrashInfoBuilder
impl CrashInfoBuilder
pub fn build(self) -> Result<CrashInfo>
pub fn has_data(&self) -> bool
pub fn new() -> Self
Sourcepub fn with_counter(&mut self, name: String, value: i64) -> Result<&mut Self>
pub fn with_counter(&mut self, name: String, value: i64) -> Result<&mut Self>
Inserts the given counter to the current set of counters in the builder.
pub fn with_counters( &mut self, counters: HashMap<String, i64>, ) -> Result<&mut Self>
pub fn with_experimental_ucontext( &mut self, ucontext: String, ) -> Result<&mut Self>
pub fn with_experimental_runtime_stack( &mut self, runtime_stack: RuntimeStack, ) -> Result<&mut Self>
pub fn with_kind(&mut self, kind: ErrorKind) -> Result<&mut Self>
pub fn with_file(&mut self, filename: String) -> Result<&mut Self>
Sourcepub fn with_file_and_contents(
&mut self,
filename: String,
contents: Vec<String>,
) -> Result<&mut Self>
pub fn with_file_and_contents( &mut self, filename: String, contents: Vec<String>, ) -> Result<&mut Self>
Appends the given file to the current set of files in the builder.
Sourcepub fn with_files(
&mut self,
files: HashMap<String, Vec<String>>,
) -> Result<&mut Self>
pub fn with_files( &mut self, files: HashMap<String, Vec<String>>, ) -> Result<&mut Self>
Sets the current set of files in the builder.
pub fn with_fingerprint(&mut self, fingerprint: String) -> Result<&mut Self>
pub fn with_incomplete(&mut self, incomplete: bool) -> Result<&mut Self>
Sourcepub fn with_log_message(
&mut self,
message: String,
also_print: bool,
) -> Result<&mut Self>
pub fn with_log_message( &mut self, message: String, also_print: bool, ) -> Result<&mut Self>
Appends the given message to the current set of messages in the builder.
pub fn with_log_messages( &mut self, log_messages: Vec<String>, ) -> Result<&mut Self>
pub fn with_message(&mut self, message: String) -> Result<&mut Self>
pub fn with_metadata(&mut self, metadata: Metadata) -> Result<&mut Self>
pub fn with_os_info(&mut self, os_info: OsInfo) -> Result<&mut Self>
pub fn with_os_info_this_machine(&mut self) -> Result<&mut Self>
pub fn with_proc_info(&mut self, proc_info: ProcInfo) -> Result<&mut Self>
pub fn with_sig_info(&mut self, sig_info: SigInfo) -> Result<&mut Self>
pub fn with_span_id(&mut self, span_id: Span) -> Result<&mut Self>
pub fn with_span_ids(&mut self, span_ids: Vec<Span>) -> Result<&mut Self>
pub fn with_stack(&mut self, stack: StackTrace) -> Result<&mut Self>
pub fn with_stack_frame( &mut self, frame: StackFrame, incomplete: bool, ) -> Result<&mut Self>
pub fn with_stack_set_complete(&mut self) -> Result<&mut Self>
pub fn with_thread(&mut self, thread: ThreadData) -> Result<&mut Self>
pub fn with_threads(&mut self, threads: Vec<ThreadData>) -> Result<&mut Self>
pub fn with_timestamp(&mut self, timestamp: DateTime<Utc>) -> Result<&mut Self>
pub fn with_timestamp_now(&mut self) -> Result<&mut Self>
pub fn with_trace_id(&mut self, trace_id: Span) -> Result<&mut Self>
pub fn with_trace_ids(&mut self, trace_ids: Vec<Span>) -> Result<&mut Self>
Sourcepub fn build_crash_ping(&self) -> Result<CrashPing>
pub fn build_crash_ping(&self) -> Result<CrashPing>
This method requires that the builder has a UUID and metadata set. Siginfo is optional for platforms that don’t support it (like Windows)
pub fn is_ping_ready(&self) -> bool
Trait Implementations§
Source§impl Debug for CrashInfoBuilder
impl Debug for CrashInfoBuilder
Source§impl Default for CrashInfoBuilder
impl Default for CrashInfoBuilder
Source§impl PartialEq for CrashInfoBuilder
impl PartialEq for CrashInfoBuilder
Source§fn eq(&self, other: &CrashInfoBuilder) -> bool
fn eq(&self, other: &CrashInfoBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CrashInfoBuilder
Auto Trait Implementations§
impl Freeze for CrashInfoBuilder
impl RefUnwindSafe for CrashInfoBuilder
impl Send for CrashInfoBuilder
impl Sync for CrashInfoBuilder
impl Unpin for CrashInfoBuilder
impl UnsafeUnpin for CrashInfoBuilder
impl UnwindSafe for CrashInfoBuilder
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