Struct reqray::CallTreeCollectorBuilder
source · [−]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
sourceimpl 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 RefUnwindSafe for CallTreeCollectorBuilder
impl Send for CallTreeCollectorBuilder
impl Sync for CallTreeCollectorBuilder
impl Unpin for CallTreeCollectorBuilder
impl UnwindSafe for CallTreeCollectorBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more