pub struct AsyncStrategy { /* private fields */ }
Expand description
Async memory tracking strategy Specialized for async/await applications with task-local tracking Provides context-aware tracking across async task boundaries
Implementations§
Source§impl AsyncStrategy
impl AsyncStrategy
Sourcepub fn new() -> Self
pub fn new() -> Self
Create new async strategy instance Initializes async coordination structures
Sourcepub fn register_current_task(&self) -> Result<u64, TrackerError>
pub fn register_current_task(&self) -> Result<u64, TrackerError>
Register current async task for tracking Should be called when entering async context
Trait Implementations§
Source§impl Default for AsyncStrategy
impl Default for AsyncStrategy
Source§impl MemoryTracker for AsyncStrategy
impl MemoryTracker for AsyncStrategy
Source§fn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>
fn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>
Initialize strategy with provided configuration
Source§fn start_tracking(&mut self) -> Result<(), TrackerError>
fn start_tracking(&mut self) -> Result<(), TrackerError>
Start active memory tracking for async contexts
Source§fn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>
fn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>
Stop tracking and collect data from all async tasks
Source§fn get_statistics(&self) -> TrackerStatistics
fn get_statistics(&self) -> TrackerStatistics
Get current tracking statistics
Source§fn tracker_type(&self) -> TrackerType
fn tracker_type(&self) -> TrackerType
Get strategy type identifier
Auto Trait Implementations§
impl Freeze for AsyncStrategy
impl RefUnwindSafe for AsyncStrategy
impl Send for AsyncStrategy
impl Sync for AsyncStrategy
impl Unpin for AsyncStrategy
impl UnwindSafe for AsyncStrategy
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