pub struct BacktraceFilter {
pub skipped_initial_crates: &'static [&'static str],
pub skipped_middle_crates: &'static [&'static str],
pub skipped_final_crates: &'static [&'static str],
pub max_entry_count: usize,
pub show_full_path: bool,
}Expand description
Configuration for filtering frames from certain crates in a backtrace.
§Examples
Use default filtering:
use rootcause_backtrace::BacktraceFilter;
let filter = BacktraceFilter::DEFAULT;Custom filtering to focus on application code:
use rootcause_backtrace::BacktraceFilter;
let filter = BacktraceFilter {
// Hide rootcause crate frames at the start
skipped_initial_crates: &["rootcause", "rootcause-backtrace"],
// Hide framework frames in the middle
skipped_middle_crates: &["tokio", "hyper", "tower"],
// Hide runtime frames at the end
skipped_final_crates: &["std", "tokio"],
// Show only the most relevant 10 frames
max_entry_count: 10,
// Show shortened paths
show_full_path: false,
};Fields§
§skipped_initial_crates: &'static [&'static str]Set of crate names whose frames should be hidden when they appear at the beginning of a backtrace.
skipped_middle_crates: &'static [&'static str]Set of crate names whose frames should be hidden when they appear in the middle of a backtrace.
skipped_final_crates: &'static [&'static str]Set of crate names whose frames should be hidden when they appear at the end of a backtrace.
max_entry_count: usizeMaximum number of entries to include in the backtrace.
show_full_path: boolWhether to show full file paths in the backtrace frames.
Implementations§
Trait Implementations§
Source§impl Clone for BacktraceFilter
impl Clone for BacktraceFilter
Source§fn clone(&self) -> BacktraceFilter
fn clone(&self) -> BacktraceFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BacktraceFilter
impl Debug for BacktraceFilter
Source§impl Default for BacktraceFilter
impl Default for BacktraceFilter
impl Copy for BacktraceFilter
Auto Trait Implementations§
impl Freeze for BacktraceFilter
impl RefUnwindSafe for BacktraceFilter
impl Send for BacktraceFilter
impl Sync for BacktraceFilter
impl Unpin for BacktraceFilter
impl UnwindSafe for BacktraceFilter
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