pub struct CaptureEngine { /* private fields */ }Expand description
Capture Engine - Event capture backend
The CaptureEngine is responsible for capturing memory events from the application and forwarding them to the EventStore. It does not store events itself; it only captures and forwards them.
Key properties:
- Non-blocking: All capture operations are non-blocking
- Backend abstraction: Supports multiple capture backends
- Zero-storage: Events are forwarded to EventStore, not stored locally
Implementations§
Source§impl CaptureEngine
impl CaptureEngine
Sourcepub fn new(
backend_type: CaptureBackendType,
event_store: SharedEventStore,
) -> Self
pub fn new( backend_type: CaptureBackendType, event_store: SharedEventStore, ) -> Self
Create a new CaptureEngine with the specified backend
§Arguments
backend_type- The type of capture backend to useevent_store- Reference to the event store
Sourcepub fn capture_alloc(&self, ptr: usize, size: usize, thread_id: u64)
pub fn capture_alloc(&self, ptr: usize, size: usize, thread_id: u64)
Capture an allocation event
§Arguments
ptr- Memory pointer addresssize- Allocation size in bytesthread_id- Thread identifier
Sourcepub fn capture_dealloc(&self, ptr: usize, size: usize, thread_id: u64)
pub fn capture_dealloc(&self, ptr: usize, size: usize, thread_id: u64)
Capture a deallocation event
§Arguments
ptr- Memory pointer addresssize- Deallocation size in bytesthread_id- Thread identifier
Sourcepub fn capture_realloc(
&self,
ptr: usize,
old_size: usize,
new_size: usize,
thread_id: u64,
)
pub fn capture_realloc( &self, ptr: usize, old_size: usize, new_size: usize, thread_id: u64, )
Capture a reallocation event
§Arguments
ptr- Memory pointer addressold_size- Old allocation size in bytesnew_size- New allocation size in bytesthread_id- Thread identifier
Sourcepub fn capture_move(
&self,
from_ptr: usize,
to_ptr: usize,
size: usize,
thread_id: u64,
)
pub fn capture_move( &self, from_ptr: usize, to_ptr: usize, size: usize, thread_id: u64, )
Capture a move event
§Arguments
from_ptr- Source pointer addressto_ptr- Destination pointer addresssize- Size in bytesthread_id- Thread identifier
Sourcepub fn event_store(&self) -> &SharedEventStore
pub fn event_store(&self) -> &SharedEventStore
Get the event store reference
Auto Trait Implementations§
impl Freeze for CaptureEngine
impl !RefUnwindSafe for CaptureEngine
impl Send for CaptureEngine
impl Sync for CaptureEngine
impl Unpin for CaptureEngine
impl UnsafeUnpin for CaptureEngine
impl !UnwindSafe for CaptureEngine
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