[][src]Struct xi_trace::Trace

pub struct Trace { /* fields omitted */ }

Stores the tracing data.

Methods

impl Trace[src]

pub fn disabled() -> Self[src]

pub fn enabled(config: Config) -> Self[src]

pub fn disable(&self)[src]

pub fn enable(&self)[src]

pub fn enable_config(&self, config: Config)[src]

pub fn get_samples_count(&self) -> usize[src]

Generally racy since the underlying storage might be mutated in a separate thread. Exposed for unit tests.

pub fn get_samples_limit(&self) -> usize[src]

Exposed for unit tests only.

pub fn is_enabled(&self) -> bool[src]

pub fn instant<S, C>(&self, name: S, categories: C) where
    S: Into<StrCow>,
    C: Into<CategoriesT>, 
[src]

pub fn instant_payload<S, C, P>(&self, name: S, categories: C, payload: P) where
    S: Into<StrCow>,
    C: Into<CategoriesT>,
    P: Into<TracePayloadT>, 
[src]

pub fn block<S, C>(&self, name: S, categories: C) -> SampleGuard where
    S: Into<StrCow>,
    C: Into<CategoriesT>, 
[src]

pub fn block_payload<S, C, P>(
    &self,
    name: S,
    categories: C,
    payload: P
) -> SampleGuard where
    S: Into<StrCow>,
    C: Into<CategoriesT>,
    P: Into<TracePayloadT>, 
[src]

pub fn closure<S, C, F, R>(&self, name: S, categories: C, closure: F) -> R where
    S: Into<StrCow>,
    C: Into<CategoriesT>,
    F: FnOnce() -> R, 
[src]

pub fn closure_payload<S, C, P, F, R>(
    &self,
    name: S,
    categories: C,
    closure: F,
    payload: P
) -> R where
    S: Into<StrCow>,
    C: Into<CategoriesT>,
    P: Into<TracePayloadT>,
    F: FnOnce() -> R, 
[src]

pub fn samples_cloned_unsorted(&self) -> Vec<Sample>[src]

pub fn samples_cloned_sorted(&self) -> Vec<Sample>[src]

pub fn save<P: AsRef<Path>>(&self, path: P, sort: bool) -> Result<(), Error>[src]

Auto Trait Implementations

impl Send for Trace

impl Unpin for Trace

impl Sync for Trace

impl UnwindSafe for Trace

impl RefUnwindSafe for Trace

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]