pub struct Settings { /* private fields */ }
Expand description
Settings for TeXRayLayer
output
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn auto() -> Self
pub fn auto() -> Self
Load settings via term-size & defaults
By default:
- All fields are printed
- Only spans are printed, events are not
- Spans of any duration are printed
Sourcepub fn writer<W: Write + Send + 'static>(&mut self, w: W) -> &mut Self
pub fn writer<W: Write + Send + 'static>(&mut self, w: W) -> &mut Self
Overwrite the writer [TexRayLayer
] will output to
Sourcepub fn enable_events(self) -> Self
pub fn enable_events(self) -> Self
Print events in addition to spans
Sourcepub fn only_show_fields(&mut self, fields: &[&'static str]) -> &mut Self
pub fn only_show_fields(&mut self, fields: &[&'static str]) -> &mut Self
When printing spans & events, only render the following fields
Sourcepub fn suppress_fields(self, fields: &[&'static str]) -> Self
pub fn suppress_fields(self, fields: &[&'static str]) -> Self
When printing spans & events, print all fields, except for these fields
Sourcepub fn min_duration(&mut self, duration: Duration) -> &mut Self
pub fn min_duration(&mut self, duration: Duration) -> &mut Self
Only show spans longer than a minimum duration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl !RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl !UnwindSafe for Settings
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