[−][src]Struct tracing_timing::Builder
Builder for TimingSubscriber instances.
This type implements the builder pattern. It lets you easily configure and construct a new
TimingSubscriber subscriber. See the individual methods for details. To start, use
[Builder::from]:
use tracing_timing::{Builder, Histogram}; let builder = Builder::from(|| Histogram::new(3).unwrap()); let subscriber = builder.build();
See the various new_* methods on Histogram for how to construct an appropriate histogram
in the first place. All samples recorded by the subscriber returned from Builder::build
will be recorded into histograms as returned by the provided constructor.
Methods
impl<NH, S, E> Builder<NH, S, E>[src]
pub fn spans<S2>(self, span_group: S2) -> Builder<NH, S2, E>[src]
pub fn events<E2>(self, event_group: E2) -> Builder<NH, S, E2>[src]
Set the mechanism used to divide events into per-span groups.
See EventGroup and the group module for details.
pub fn time(self, time: Clock) -> Builder<NH, S, E>[src]
Set the time source to use for time measurements.
pub fn build(self) -> TimingSubscriber<NH, S, E> where
S: SpanGroup,
E: EventGroup,
S::Id: Hash + Eq,
E::Id: Hash + Eq,
NH: FnMut() -> Histogram<u64>, [src]
S: SpanGroup,
E: EventGroup,
S::Id: Hash + Eq,
E::Id: Hash + Eq,
NH: FnMut() -> Histogram<u64>,
Construct a TimingSubscriber as configured.
Trait Implementations
Auto Trait Implementations
impl<NH, S, E> Send for Builder<NH, S, E> where
E: Send,
NH: Send,
S: Send,
E: Send,
NH: Send,
S: Send,
impl<NH, S, E> Unpin for Builder<NH, S, E> where
E: Unpin,
NH: Unpin,
S: Unpin,
E: Unpin,
NH: Unpin,
S: Unpin,
impl<NH, S, E> Sync for Builder<NH, S, E> where
E: Sync,
NH: Sync,
S: Sync,
E: Sync,
NH: Sync,
S: Sync,
impl<NH, S, E> UnwindSafe for Builder<NH, S, E> where
E: UnwindSafe,
NH: UnwindSafe,
S: UnwindSafe,
E: UnwindSafe,
NH: UnwindSafe,
S: UnwindSafe,
impl<NH, S, E> RefUnwindSafe for Builder<NH, S, E> where
E: RefUnwindSafe,
NH: RefUnwindSafe,
S: RefUnwindSafe,
E: RefUnwindSafe,
NH: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,