pub struct CallTreeCollectorBuilder { /* private fields */ }Expand description
Configure & Build CallTreeCollectors.
Example:
use reqray::{CallTreeCollectorBuilder, display::LoggingCallTreeCollectorBuilder};
let collector =
CallTreeCollectorBuilder::default()
.max_call_depth(42)
.build_with_collector(
LoggingCallTreeCollectorBuilder::default()
.left_margin(20)
.build()
);Implementations§
Source§impl CallTreeCollectorBuilder
impl CallTreeCollectorBuilder
Sourcepub fn clock(self, clock: Clock) -> Self
pub fn clock(self, clock: Clock) -> Self
The clock to use for measure execution time.
The default is to use a real clock, but you can pass in a mock clock for testing.
Sourcepub fn max_call_depth(self, max_call_depth: usize) -> Self
pub fn max_call_depth(self, max_call_depth: usize) -> Self
The maximum call depth of the call tree to record – must be
at least 2.
Call paths below this depth are capped – so their execution is recorded as if they were inlined.
Sourcepub fn build_with_collector<H>(self, processor: H) -> CallTreeCollector<H>where
H: FinishedCallTreeProcessor + 'static,
pub fn build_with_collector<H>(self, processor: H) -> CallTreeCollector<H>where
H: FinishedCallTreeProcessor + 'static,
Build the CallTreeCollector handing over the finished call trees
to collector.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CallTreeCollectorBuilder
impl RefUnwindSafe for CallTreeCollectorBuilder
impl Send for CallTreeCollectorBuilder
impl Sync for CallTreeCollectorBuilder
impl Unpin for CallTreeCollectorBuilder
impl UnwindSafe for CallTreeCollectorBuilder
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