pub struct ScopedSpan<'a> { /* private fields */ }Expand description
RAII guard that calls begin on construction and end on drop.
use proof_engine::debug::profiler::{FrameProfiler, ScopedSpan};
let mut profiler = FrameProfiler::new(60);
{
let _span = ScopedSpan::new(&mut profiler, "my_section");
// ... work ...
} // end() called automaticallyImplementations§
Source§impl<'a> ScopedSpan<'a>
impl<'a> ScopedSpan<'a>
pub fn new(profiler: &'a mut FrameProfiler, name: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ScopedSpan<'a>
impl<'a> RefUnwindSafe for ScopedSpan<'a>
impl<'a> Send for ScopedSpan<'a>
impl<'a> Sync for ScopedSpan<'a>
impl<'a> Unpin for ScopedSpan<'a>
impl<'a> UnsafeUnpin for ScopedSpan<'a>
impl<'a> !UnwindSafe for ScopedSpan<'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