Skip to main content

CrashInfoBuilder

Struct CrashInfoBuilder 

Source
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: Uuid

Implementations§

Source§

impl CrashInfoBuilder

Source

pub fn build(self) -> Result<CrashInfo>

Source

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

Source

pub fn new() -> Self

Source

pub fn with_counter(&mut self, name: String, value: i64) -> Result<()>

Inserts the given counter to the current set of counters in the builder.

Source

pub fn with_counters(&mut self, counters: HashMap<String, i64>) -> Result<()>

Source

pub fn with_experimental_additional_tags( &mut self, additional_tags: Vec<String>, ) -> Result<()>

Source

pub fn with_experimental_runtime_stack( &mut self, runtime_stack: RuntimeStack, ) -> Result<()>

Source

pub fn with_kind(&mut self, kind: ErrorKind) -> Result<()>

Source

pub fn with_file(&mut self, filename: String) -> Result<()>

Source

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.

Source

pub fn with_files(&mut self, files: HashMap<String, Vec<String>>) -> Result<()>

Sets the current set of files in the builder.

Source

pub fn with_fingerprint(&mut self, fingerprint: String) -> Result<()>

Source

pub fn with_incomplete(&mut self, incomplete: bool) -> Result<()>

Source

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.

Source

pub fn with_log_messages(&mut self, log_messages: Vec<String>) -> Result<()>

Source

pub fn with_message(&mut self, message: String) -> Result<()>

Source

pub fn with_thread_name(&mut self, thread_name: String) -> Result<()>

Source

pub fn with_metadata(&mut self, metadata: Metadata) -> Result<()>

Source

pub fn with_os_info(&mut self, os_info: OsInfo) -> Result<()>

Source

pub fn with_os_info_this_machine(&mut self) -> Result<()>

Source

pub fn with_proc_info(&mut self, proc_info: ProcInfo) -> Result<()>

Source

pub fn with_sig_info(&mut self, sig_info: SigInfo) -> Result<()>

Source

pub fn with_span_id(&mut self, span_id: Span) -> Result<()>

Source

pub fn with_span_ids(&mut self, span_ids: Vec<Span>) -> Result<()>

Source

pub fn with_stack(&mut self, stack: StackTrace) -> Result<()>

Source

pub fn with_stack_frame( &mut self, frame: StackFrame, incomplete: bool, ) -> Result<()>

Source

pub fn with_stack_set_complete(&mut self) -> Result<()>

Source

pub fn with_thread(&mut self, thread: ThreadData) -> Result<()>

Source

pub fn with_threads(&mut self, threads: Vec<ThreadData>) -> Result<()>

Source

pub fn with_timestamp(&mut self, timestamp: DateTime<Utc>) -> Result<()>

Source

pub fn with_timestamp_now(&mut self) -> Result<()>

Source

pub fn with_trace_id(&mut self, trace_id: Span) -> Result<()>

Source

pub fn with_trace_ids(&mut self, trace_ids: Vec<Span>) -> Result<()>

Source

pub fn with_ucontext(&mut self, ucontext: Ucontext) -> Result<()>

Source

pub fn build_crash_ping(&self) -> Result<CrashPing>

This method requires that the builder has Metadata and Kind set

Source

pub fn is_ping_ready(&self) -> bool

Source

pub fn has_message(&self) -> bool

Trait Implementations§

Source§

impl Debug for CrashInfoBuilder

Source§

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

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

impl Default for CrashInfoBuilder

Source§

fn default() -> Self

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

impl PartialEq for CrashInfoBuilder

Source§

fn eq(&self, other: &CrashInfoBuilder) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CrashInfoBuilder

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> MaybeSend for T
where T: Send,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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