pub struct ScopedTrace { /* private fields */ }
Implementations§
Source§impl ScopedTrace
impl ScopedTrace
Sourcepub fn start_trace<T: AsRef<CStr>>(name: &T) -> Self
pub fn start_trace<T: AsRef<CStr>>(name: &T) -> Self
Starts a new ScopedTrace, which ends when the returned object is dropped.
Keep in mind the general limitations of HiTrace, where a call to
finish_trace will end the span of the most recently started trace.
Users should try not to mix ScopedTrace
with manual calls to finish_trace()
,
and should avoid passing the ScopedTrace
object around.
Sourcepub fn start_trace_str(name: &str) -> Self
pub fn start_trace_str(name: &str) -> Self
Like start_trace()
but accepts a &str
.
§Panic
Panics if the provided name can’t be converted into a CString.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScopedTrace
impl RefUnwindSafe for ScopedTrace
impl !Send for ScopedTrace
impl !Sync for ScopedTrace
impl Unpin for ScopedTrace
impl UnwindSafe for ScopedTrace
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