pub struct TimedSection<'a> { /* private fields */ }Expand description
A timed section that creates a tracing span and captures elapsed time.
Created via MetaCollector::timed_section(). When finished, the elapsed
time is recorded both to tracing and to the metadata.
Implementations§
Source§impl<'a> TimedSection<'a>
impl<'a> TimedSection<'a>
Sourcepub fn finish_with_data<T: Serialize>(self, data: &T)
pub fn finish_with_data<T: Serialize>(self, data: &T)
Finish the section with additional data
Sourcepub fn finish_with_error(self, error: impl Into<String>)
pub fn finish_with_error(self, error: impl Into<String>)
Finish the section, recording an error
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TimedSection<'a>
impl<'a> !RefUnwindSafe for TimedSection<'a>
impl<'a> Send for TimedSection<'a>
impl<'a> Sync for TimedSection<'a>
impl<'a> Unpin for TimedSection<'a>
impl<'a> UnsafeUnpin for TimedSection<'a>
impl<'a> !UnwindSafe for TimedSection<'a>
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