pub struct CrashInfoBuilder {Show 16 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 ucontext: Option<Ucontext>,
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>>§ucontext: Option<Ucontext>§uuid: UuidImplementations§
Source§impl CrashInfoBuilder
impl CrashInfoBuilder
pub fn build(self) -> Result<CrashInfo>
Sourcepub fn has_data(&self) -> bool
pub fn has_data(&self) -> bool
True if the builder received anything at all. The uuid is generated
when the builder is created, so it is excluded: comparing the whole struct
against Self::default() would always differ on it and always report data
pub fn new() -> Self
Sourcepub fn with_counter(&mut self, name: String, value: i64) -> Result<()>
pub fn with_counter(&mut self, name: String, value: i64) -> Result<()>
Inserts the given counter to the current set of counters in the builder.
pub fn with_counters(&mut self, counters: HashMap<String, i64>) -> Result<()>
pub fn with_experimental_runtime_stack( &mut self, runtime_stack: RuntimeStack, ) -> Result<()>
pub fn with_kind(&mut self, kind: ErrorKind) -> Result<()>
pub fn with_file(&mut self, filename: String) -> Result<()>
Sourcepub fn with_file_and_contents(
&mut self,
filename: String,
contents: Vec<String>,
) -> Result<()>
pub fn with_file_and_contents( &mut self, filename: String, contents: Vec<String>, ) -> Result<()>
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<()>
pub fn with_files(&mut self, files: HashMap<String, Vec<String>>) -> Result<()>
Sets the current set of files in the builder.
pub fn with_fingerprint(&mut self, fingerprint: String) -> Result<()>
pub fn with_incomplete(&mut self, incomplete: bool) -> Result<()>
Sourcepub fn with_log_message(
&mut self,
message: String,
also_print: bool,
) -> Result<()>
pub fn with_log_message( &mut self, message: String, also_print: bool, ) -> Result<()>
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<()>
pub fn with_message(&mut self, message: String) -> Result<()>
pub fn with_thread_name(&mut self, thread_name: String) -> Result<()>
pub fn with_metadata(&mut self, metadata: Metadata) -> Result<()>
pub fn with_os_info(&mut self, os_info: OsInfo) -> Result<()>
pub fn with_os_info_this_machine(&mut self) -> Result<()>
pub fn with_proc_info(&mut self, proc_info: ProcInfo) -> Result<()>
pub fn with_sig_info(&mut self, sig_info: SigInfo) -> Result<()>
pub fn with_span_id(&mut self, span_id: Span) -> Result<()>
pub fn with_span_ids(&mut self, span_ids: Vec<Span>) -> Result<()>
pub fn with_stack(&mut self, stack: StackTrace) -> Result<()>
pub fn with_stack_frame( &mut self, frame: StackFrame, incomplete: bool, ) -> Result<()>
pub fn with_stack_set_complete(&mut self) -> Result<()>
pub fn with_thread(&mut self, thread: ThreadData) -> Result<()>
pub fn with_threads(&mut self, threads: Vec<ThreadData>) -> Result<()>
pub fn with_timestamp(&mut self, timestamp: DateTime<Utc>) -> Result<()>
pub fn with_timestamp_now(&mut self) -> Result<()>
pub fn with_trace_id(&mut self, trace_id: Span) -> Result<()>
pub fn with_trace_ids(&mut self, trace_ids: Vec<Span>) -> Result<()>
pub fn with_ucontext(&mut self, ucontext: Ucontext) -> Result<()>
Sourcepub fn build_crash_ping(&self) -> Result<CrashPing>
pub fn build_crash_ping(&self) -> Result<CrashPing>
This method requires that the builder has Metadata and Kind set
pub fn is_ping_ready(&self) -> bool
pub fn has_message(&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
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