pub struct Capture { /* private fields */ }Expand description
An in-progress capture of profile annotations.
To start a capture, use CaptureOptions::start, CaptureOptions::blocking_start, or CaptureOptions::try_start.
Only one Capture may exist at one time.
Implementations§
Source§impl Capture
impl Capture
Sourcepub fn finish(self) -> Annotations
pub fn finish(self) -> Annotations
Finishes recording profile annotations and returns what was recorded.
Sourcepub fn abort(self)
pub fn abort(self)
Aborts recording profile annotations.
This is equivalent to dropping the Capture object.
Sourcepub fn is_active() -> bool
pub fn is_active() -> bool
Returns true if a profile annotation capture is ongoing.
This only reports the status of annotation captures. It does not
indicate whether samply or perf or another profiler is currently
capturing profile data for this process (this crate does not provide a
way to do that).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Capture
impl !UnwindSafe for Capture
impl Freeze for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more