pub struct CaptureOptions { /* private fields */ }Expand description
Options for capturing profile annotations.
Implementations§
Source§impl CaptureOptions
impl CaptureOptions
Sourcepub fn with_memory_limit(self, memory_limit: Option<usize>) -> Self
pub fn with_memory_limit(self, memory_limit: Option<usize>) -> Self
Sets a limit on the amount of memory that can be used for recording
captured spans to memory_limit, in bytes. If memory_limit is
None, then there will be no limit (which is also the default).
The limit is honored approximately. Recording a span takes Span::BYTES bytes.
Sourcepub fn with_record_rss(self, record_rss: bool) -> Self
pub fn with_record_rss(self, record_rss: bool) -> Self
Enables or disables recording the amount of memory in use (the resident set size) during the capture. By default, RSS is recorded every 100 milliseconds. When this feature is enabled, capture runs a thread for recording the data.
Sourcepub fn blocking_start(self) -> Capture
pub fn blocking_start(self) -> Capture
Starts capturing profile annotations, returning a Capture that can be used to finish or abort captures. Dropping the Capture will also abort capturing.
For use in blocking contexts. If a capture is already in progress, this function will wait for it to complete before starting a new one.
§Panic
Panics if called from an asynchronous execution context.
Trait Implementations§
Source§impl Clone for CaptureOptions
impl Clone for CaptureOptions
Source§fn clone(&self) -> CaptureOptions
fn clone(&self) -> CaptureOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CaptureOptions
impl Debug for CaptureOptions
Auto Trait Implementations§
impl Freeze for CaptureOptions
impl RefUnwindSafe for CaptureOptions
impl Send for CaptureOptions
impl Sync for CaptureOptions
impl Unpin for CaptureOptions
impl UnsafeUnpin for CaptureOptions
impl UnwindSafe for CaptureOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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