pub struct Trace { /* private fields */ }Expand description
Stores the tracing data.
Implementations§
Source§impl Trace
impl Trace
pub fn disabled() -> Self
pub fn enabled(config: Config) -> Self
pub fn disable(&self)
pub fn enable(&self)
pub fn enable_config(&self, config: Config)
Sourcepub fn get_samples_count(&self) -> usize
pub fn get_samples_count(&self) -> usize
Generally racy since the underlying storage might be mutated in a separate thread. Exposed for unit tests.
Sourcepub fn get_samples_limit(&self) -> usize
pub fn get_samples_limit(&self) -> usize
Exposed for unit tests only.
pub fn is_enabled(&self) -> bool
pub fn instant<S, C>(&self, name: S, categories: C)
pub fn instant_payload<S, C, P>(&self, name: S, categories: C, payload: P)
pub fn block<S, C>(&self, name: S, categories: C) -> SampleGuard<'_>
pub fn block_payload<S, C, P>( &self, name: S, categories: C, payload: P, ) -> SampleGuard<'_>
pub fn closure<S, C, F, R>(&self, name: S, categories: C, closure: F) -> R
pub fn closure_payload<S, C, P, F, R>( &self, name: S, categories: C, closure: F, payload: P, ) -> R
pub fn samples_cloned_unsorted(&self) -> Vec<Sample>
pub fn samples_cloned_sorted(&self) -> Vec<Sample>
pub fn save<P: AsRef<Path>>(&self, path: P, sort: bool) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnwindSafe for Trace
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