Event

Enum Event 

Source
pub enum Event {
Show 88 variants New { timestamp: u64, var_name: String, var_id: String, type_name: String, }, Borrow { timestamp: u64, borrower_name: String, borrower_id: String, owner_id: String, mutable: bool, }, Move { timestamp: u64, from_id: String, to_name: String, to_id: String, }, Drop { timestamp: u64, var_id: String, }, RcNew { timestamp: u64, var_name: String, var_id: String, type_name: String, strong_count: usize, weak_count: usize, }, RcClone { timestamp: u64, var_name: String, var_id: String, source_id: String, strong_count: usize, weak_count: usize, }, ArcNew { timestamp: u64, var_name: String, var_id: String, type_name: String, strong_count: usize, weak_count: usize, }, ArcClone { timestamp: u64, var_name: String, var_id: String, source_id: String, strong_count: usize, weak_count: usize, }, RefCellNew { timestamp: u64, var_name: String, var_id: String, type_name: String, }, RefCellBorrow { timestamp: u64, borrow_id: String, refcell_id: String, is_mutable: bool, location: String, }, RefCellDrop { timestamp: u64, borrow_id: String, location: String, }, CellNew { timestamp: u64, var_name: String, var_id: String, type_name: String, }, CellGet { timestamp: u64, cell_id: String, location: String, }, CellSet { timestamp: u64, cell_id: String, location: String, }, StaticInit { timestamp: u64, var_name: String, var_id: String, type_name: String, is_mutable: bool, }, StaticAccess { timestamp: u64, var_id: String, var_name: String, is_write: bool, location: String, }, ConstEval { timestamp: u64, const_name: String, const_id: String, type_name: String, location: String, }, RawPtrCreated { timestamp: u64, var_name: String, var_id: String, ptr_type: String, address: usize, location: String, }, RawPtrDeref { timestamp: u64, ptr_id: String, location: String, is_write: bool, }, UnsafeBlockEnter { timestamp: u64, block_id: String, location: String, }, UnsafeBlockExit { timestamp: u64, block_id: String, location: String, }, UnsafeFnCall { timestamp: u64, fn_name: String, location: String, }, FfiCall { timestamp: u64, fn_name: String, location: String, }, Transmute { timestamp: u64, from_type: String, to_type: String, location: String, }, UnionFieldAccess { timestamp: u64, union_name: String, field_name: String, location: String, }, AsyncBlockEnter { timestamp: u64, block_id: String, location: String, }, AsyncBlockExit { timestamp: u64, block_id: String, location: String, }, AwaitStart { timestamp: u64, await_id: String, future_name: String, location: String, }, AwaitEnd { timestamp: u64, await_id: String, location: String, }, LoopEnter { timestamp: u64, loop_id: String, loop_type: String, location: String, }, LoopIteration { timestamp: u64, loop_id: String, iteration: usize, location: String, }, LoopExit { timestamp: u64, loop_id: String, location: String, }, MatchEnter { timestamp: u64, match_id: String, location: String, }, MatchArm { timestamp: u64, match_id: String, arm_index: usize, pattern: String, location: String, }, MatchExit { timestamp: u64, match_id: String, location: String, }, Branch { timestamp: u64, branch_id: String, branch_type: String, location: String, }, Return { timestamp: u64, return_id: String, has_value: bool, location: String, }, Try { timestamp: u64, try_id: String, location: String, }, IndexAccess { timestamp: u64, access_id: String, container: String, location: String, }, FieldAccess { timestamp: u64, access_id: String, base: String, field: String, location: String, }, Call { timestamp: u64, call_id: String, fn_name: String, location: String, }, Lock { timestamp: u64, lock_id: String, lock_type: String, var_name: String, location: String, }, Unwrap { timestamp: u64, unwrap_id: String, method: String, var_name: String, location: String, }, Clone { timestamp: u64, clone_id: String, var_name: String, location: String, }, Deref { timestamp: u64, deref_id: String, var_name: String, location: String, }, Break { timestamp: u64, break_id: String, loop_label: Option<String>, location: String, }, Continue { timestamp: u64, continue_id: String, loop_label: Option<String>, location: String, }, ClosureCreate { timestamp: u64, closure_id: String, capture_mode: String, location: String, }, StructCreate { timestamp: u64, struct_id: String, type_name: String, location: String, }, TupleCreate { timestamp: u64, tuple_id: String, len: usize, location: String, }, LetElse { timestamp: u64, let_id: String, pattern: String, location: String, }, Range { timestamp: u64, range_id: String, range_type: String, location: String, }, BinaryOp { timestamp: u64, op_id: String, operator: String, location: String, }, ArrayCreate { timestamp: u64, array_id: String, len: usize, location: String, }, TypeCast { timestamp: u64, cast_id: String, to_type: String, location: String, }, RegionEnter { timestamp: u64, region_id: String, name: String, location: String, }, RegionExit { timestamp: u64, region_id: String, location: String, }, FnEnter { timestamp: u64, fn_id: String, fn_name: String, location: String, }, FnExit { timestamp: u64, fn_id: String, fn_name: String, location: String, }, ClosureCapture { timestamp: u64, closure_id: String, var_name: String, capture_mode: String, location: String, }, WeakNew { timestamp: u64, var_name: String, var_id: String, source_id: String, weak_count: usize, location: String, }, WeakClone { timestamp: u64, var_name: String, var_id: String, source_id: String, weak_count: usize, location: String, }, WeakUpgrade { timestamp: u64, weak_id: String, success: bool, location: String, }, BoxNew { timestamp: u64, var_name: String, var_id: String, type_name: String, location: String, }, BoxIntoRaw { timestamp: u64, box_id: String, location: String, }, BoxFromRaw { timestamp: u64, var_name: String, var_id: String, location: String, }, LockGuardAcquire { timestamp: u64, guard_id: String, lock_id: String, lock_type: String, location: String, }, LockGuardDrop { timestamp: u64, guard_id: String, location: String, }, PinNew { timestamp: u64, var_name: String, var_id: String, location: String, }, PinIntoInner { timestamp: u64, pin_id: String, location: String, }, CowBorrowed { timestamp: u64, var_name: String, var_id: String, location: String, }, CowOwned { timestamp: u64, var_name: String, var_id: String, location: String, }, CowToMut { timestamp: u64, cow_id: String, cloned: bool, location: String, }, ThreadSpawn { timestamp: u64, thread_id: String, location: String, }, ThreadJoin { timestamp: u64, thread_id: String, location: String, }, ChannelSenderNew { timestamp: u64, sender_id: String, channel_id: String, location: String, }, ChannelReceiverNew { timestamp: u64, receiver_id: String, channel_id: String, location: String, }, ChannelSend { timestamp: u64, sender_id: String, location: String, }, ChannelRecv { timestamp: u64, receiver_id: String, success: bool, location: String, }, OnceCellNew { timestamp: u64, var_name: String, var_id: String, cell_type: String, location: String, }, OnceCellSet { timestamp: u64, cell_id: String, success: bool, location: String, }, OnceCellGet { timestamp: u64, cell_id: String, was_initialized: bool, location: String, }, OnceCellGetOrInit { timestamp: u64, cell_id: String, was_initialized: bool, location: String, }, MaybeUninitNew { timestamp: u64, var_name: String, var_id: String, initialized: bool, location: String, }, MaybeUninitWrite { timestamp: u64, var_id: String, location: String, }, MaybeUninitAssumeInit { timestamp: u64, var_id: String, location: String, }, MaybeUninitAssumeInitRead { timestamp: u64, var_id: String, location: String, }, MaybeUninitAssumeInitDrop { timestamp: u64, var_id: String, location: String, },
}
Expand description

An ownership or borrowing event recorded at runtime.

Variants§

§

New

Variable created via track_new.

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§

Borrow

Variable borrowed via track_borrow.

Fields

§timestamp: u64
§borrower_name: String
§borrower_id: String
§owner_id: String
§mutable: bool
§

Move

Ownership moved via track_move.

Fields

§timestamp: u64
§from_id: String
§to_name: String
§to_id: String
§

Drop

Variable dropped via track_drop.

Fields

§timestamp: u64
§var_id: String
§

RcNew

Rc::new allocation with reference counting.

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§strong_count: usize
§weak_count: usize
§

RcClone

Rc::clone operation (shared ownership).

Fields

§timestamp: u64
§var_name: String
§var_id: String
§source_id: String
§strong_count: usize
§weak_count: usize
§

ArcNew

Arc::new allocation with atomic reference counting

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§strong_count: usize
§weak_count: usize
§

ArcClone

Arc::clone operation (thread-safe shared ownership)

Fields

§timestamp: u64
§var_name: String
§var_id: String
§source_id: String
§strong_count: usize
§weak_count: usize
§

RefCellNew

RefCell::new allocation

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§

RefCellBorrow

RefCell::borrow or borrow_mut operation

Fields

§timestamp: u64
§borrow_id: String
§refcell_id: String
§is_mutable: bool
§location: String
§

RefCellDrop

RefCell borrow dropped (Ref/RefMut dropped)

Fields

§timestamp: u64
§borrow_id: String
§location: String
§

CellNew

Cell::new allocation

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§

CellGet

Cell::get operation

Fields

§timestamp: u64
§cell_id: String
§location: String
§

CellSet

Cell::set operation

Fields

§timestamp: u64
§cell_id: String
§location: String
§

StaticInit

Static variable initialization

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§is_mutable: bool
§

StaticAccess

Static variable access (read or write)

Fields

§timestamp: u64
§var_id: String
§var_name: String
§is_write: bool
§location: String
§

ConstEval

Const evaluation (compile-time constant)

Fields

§timestamp: u64
§const_name: String
§const_id: String
§type_name: String
§location: String
§

RawPtrCreated

Raw pointer created

Fields

§timestamp: u64
§var_name: String
§var_id: String
§ptr_type: String
§address: usize
§location: String
§

RawPtrDeref

Raw pointer dereferenced

Fields

§timestamp: u64
§ptr_id: String
§location: String
§is_write: bool
§

UnsafeBlockEnter

Unsafe block entered

Fields

§timestamp: u64
§block_id: String
§location: String
§

UnsafeBlockExit

Unsafe block exited

Fields

§timestamp: u64
§block_id: String
§location: String
§

UnsafeFnCall

Unsafe function called

Fields

§timestamp: u64
§fn_name: String
§location: String
§

FfiCall

FFI (Foreign Function Interface) call

Fields

§timestamp: u64
§fn_name: String
§location: String
§

Transmute

Transmute operation

Fields

§timestamp: u64
§from_type: String
§to_type: String
§location: String
§

UnionFieldAccess

Union field access

Fields

§timestamp: u64
§union_name: String
§field_name: String
§location: String
§

AsyncBlockEnter

Async block entered

Fields

§timestamp: u64
§block_id: String
§location: String
§

AsyncBlockExit

Async block exited

Fields

§timestamp: u64
§block_id: String
§location: String
§

AwaitStart

Await expression started

Fields

§timestamp: u64
§await_id: String
§future_name: String
§location: String
§

AwaitEnd

Await expression completed

Fields

§timestamp: u64
§await_id: String
§location: String
§

LoopEnter

Loop entered (for, while, loop)

Fields

§timestamp: u64
§loop_id: String
§loop_type: String
§location: String
§

LoopIteration

Loop iteration

Fields

§timestamp: u64
§loop_id: String
§iteration: usize
§location: String
§

LoopExit

Loop exited

Fields

§timestamp: u64
§loop_id: String
§location: String
§

MatchEnter

Match expression entered

Fields

§timestamp: u64
§match_id: String
§location: String
§

MatchArm

Match arm taken

Fields

§timestamp: u64
§match_id: String
§arm_index: usize
§pattern: String
§location: String
§

MatchExit

Match expression exited

Fields

§timestamp: u64
§match_id: String
§location: String
§

Branch

Branch taken (if/else)

Fields

§timestamp: u64
§branch_id: String
§branch_type: String
§location: String
§

Return

Return statement

Fields

§timestamp: u64
§return_id: String
§has_value: bool
§location: String
§

Try

Try/? operator

Fields

§timestamp: u64
§try_id: String
§location: String
§

IndexAccess

Index access (arr[i])

Fields

§timestamp: u64
§access_id: String
§container: String
§location: String
§

FieldAccess

Field access (obj.field)

Fields

§timestamp: u64
§access_id: String
§base: String
§field: String
§location: String
§

Call

Function call

Fields

§timestamp: u64
§call_id: String
§fn_name: String
§location: String
§

Lock

Lock acquired (Mutex/RwLock)

Fields

§timestamp: u64
§lock_id: String
§lock_type: String
§var_name: String
§location: String
§

Unwrap

Unwrap called (Option/Result)

Fields

§timestamp: u64
§unwrap_id: String
§method: String
§var_name: String
§location: String
§

Clone

Clone called

Fields

§timestamp: u64
§clone_id: String
§var_name: String
§location: String
§

Deref

Dereference operation

Fields

§timestamp: u64
§deref_id: String
§var_name: String
§location: String
§

Break

Break statement

Fields

§timestamp: u64
§break_id: String
§loop_label: Option<String>
§location: String
§

Continue

Continue statement

Fields

§timestamp: u64
§continue_id: String
§loop_label: Option<String>
§location: String
§

ClosureCreate

Closure creation

Fields

§timestamp: u64
§closure_id: String
§capture_mode: String
§location: String
§

StructCreate

Struct construction

Fields

§timestamp: u64
§struct_id: String
§type_name: String
§location: String
§

TupleCreate

Tuple construction

Fields

§timestamp: u64
§tuple_id: String
§len: usize
§location: String
§

LetElse

Let-else pattern

Fields

§timestamp: u64
§let_id: String
§pattern: String
§location: String
§

Range

Range expression

Fields

§timestamp: u64
§range_id: String
§range_type: String
§location: String
§

BinaryOp

Binary operation

Fields

§timestamp: u64
§op_id: String
§operator: String
§location: String
§

ArrayCreate

Array creation

Fields

§timestamp: u64
§array_id: String
§len: usize
§location: String
§

TypeCast

Type cast (non-pointer)

Fields

§timestamp: u64
§cast_id: String
§to_type: String
§location: String
§

RegionEnter

Region enter

Fields

§timestamp: u64
§region_id: String
§name: String
§location: String
§

RegionExit

Region exit

Fields

§timestamp: u64
§region_id: String
§location: String
§

FnEnter

Function entry

Fields

§timestamp: u64
§fn_id: String
§fn_name: String
§location: String
§

FnExit

Function exit

Fields

§timestamp: u64
§fn_id: String
§fn_name: String
§location: String
§

ClosureCapture

Closure variable capture

Fields

§timestamp: u64
§closure_id: String
§var_name: String
§capture_mode: String
§location: String
§

WeakNew

Weak::new or Rc::downgrade

Fields

§timestamp: u64
§var_name: String
§var_id: String
§source_id: String
§weak_count: usize
§location: String
§

WeakClone

Weak::clone

Fields

§timestamp: u64
§var_name: String
§var_id: String
§source_id: String
§weak_count: usize
§location: String
§

WeakUpgrade

Weak::upgrade attempt

Fields

§timestamp: u64
§weak_id: String
§success: bool
§location: String
§

BoxNew

Box::new allocation

Fields

§timestamp: u64
§var_name: String
§var_id: String
§type_name: String
§location: String
§

BoxIntoRaw

Box::into_raw

Fields

§timestamp: u64
§box_id: String
§location: String
§

BoxFromRaw

Box::from_raw

Fields

§timestamp: u64
§var_name: String
§var_id: String
§location: String
§

LockGuardAcquire

Mutex/RwLock guard acquired

Fields

§timestamp: u64
§guard_id: String
§lock_id: String
§lock_type: String
§location: String
§

LockGuardDrop

Mutex/RwLock guard dropped

Fields

§timestamp: u64
§guard_id: String
§location: String
§

PinNew

Pin::new

Fields

§timestamp: u64
§var_name: String
§var_id: String
§location: String
§

PinIntoInner

Pin::into_inner

Fields

§timestamp: u64
§pin_id: String
§location: String
§

CowBorrowed

Cow::Borrowed

Fields

§timestamp: u64
§var_name: String
§var_id: String
§location: String
§

CowOwned

Cow::Owned

Fields

§timestamp: u64
§var_name: String
§var_id: String
§location: String
§

CowToMut

Cow::to_mut (clone-on-write triggered)

Fields

§timestamp: u64
§cow_id: String
§cloned: bool
§location: String
§

ThreadSpawn

Thread spawn

Fields

§timestamp: u64
§thread_id: String
§location: String
§

ThreadJoin

Thread join

Fields

§timestamp: u64
§thread_id: String
§location: String
§

ChannelSenderNew

Channel sender created

Fields

§timestamp: u64
§sender_id: String
§channel_id: String
§location: String
§

ChannelReceiverNew

Channel receiver created

Fields

§timestamp: u64
§receiver_id: String
§channel_id: String
§location: String
§

ChannelSend

Channel send

Fields

§timestamp: u64
§sender_id: String
§location: String
§

ChannelRecv

Channel receive

Fields

§timestamp: u64
§receiver_id: String
§success: bool
§location: String
§

OnceCellNew

OnceCell::new or OnceLock::new

Fields

§timestamp: u64
§var_name: String
§var_id: String
§cell_type: String
§location: String
§

OnceCellSet

OnceCell::set or OnceLock::set

Fields

§timestamp: u64
§cell_id: String
§success: bool
§location: String
§

OnceCellGet

OnceCell::get or OnceLock::get

Fields

§timestamp: u64
§cell_id: String
§was_initialized: bool
§location: String
§

OnceCellGetOrInit

OnceCell::get_or_init or OnceLock::get_or_init

Fields

§timestamp: u64
§cell_id: String
§was_initialized: bool
§location: String
§

MaybeUninitNew

MaybeUninit::uninit or MaybeUninit::new

Fields

§timestamp: u64
§var_name: String
§var_id: String
§initialized: bool
§location: String
§

MaybeUninitWrite

MaybeUninit::write

Fields

§timestamp: u64
§var_id: String
§location: String
§

MaybeUninitAssumeInit

MaybeUninit::assume_init (unsafe)

Fields

§timestamp: u64
§var_id: String
§location: String
§

MaybeUninitAssumeInitRead

MaybeUninit::assume_init_read (unsafe)

Fields

§timestamp: u64
§var_id: String
§location: String
§

MaybeUninitAssumeInitDrop

MaybeUninit::assume_init_drop (unsafe)

Fields

§timestamp: u64
§var_id: String
§location: String

Implementations§

Source§

impl Event

Source

pub fn timestamp(&self) -> u64

Get the timestamp of this event

Source

pub fn var_name(&self) -> Option<&str>

Get the variable name (if applicable)

Source

pub fn is_new(&self) -> bool

Check if this is a New event

Source

pub fn is_borrow(&self) -> bool

Check if this is a Borrow event

Source

pub fn is_move(&self) -> bool

Check if this is a Move event

Source

pub fn is_drop(&self) -> bool

Check if this is a Drop event

Source

pub fn is_rc(&self) -> bool

Check if this is an Rc event (new or clone)

Source

pub fn is_arc(&self) -> bool

Check if this is an Arc event (new or clone)

Source

pub fn is_refcounted(&self) -> bool

Check if this is a reference-counted event

Source

pub fn is_refcell(&self) -> bool

Check if this is a RefCell event

Source

pub fn is_cell(&self) -> bool

Check if this is a Cell event

Source

pub fn is_interior_mutability(&self) -> bool

Check if this is an interior mutability event

Source

pub fn is_static(&self) -> bool

Check if this is a static event

Source

pub fn is_const(&self) -> bool

Check if this is a const event

Source

pub fn is_global(&self) -> bool

Check if this is a global variable event (static or const)

Source

pub fn is_unsafe(&self) -> bool

Check if this is an unsafe event

Source

pub fn is_raw_ptr(&self) -> bool

Check if this is a raw pointer event

Source

pub fn is_ffi(&self) -> bool

Check if this is an FFI event

Source

pub fn strong_count(&self) -> Option<usize>

Get strong count if this is a reference-counted event

Source

pub fn weak_count(&self) -> Option<usize>

Get weak count if this is a reference-counted event

Source

pub fn is_weak(&self) -> bool

Check if this is a Weak reference event

Source

pub fn is_box(&self) -> bool

Check if this is a Box event

Source

pub fn is_lock_guard(&self) -> bool

Check if this is a lock guard event

Source

pub fn is_pin(&self) -> bool

Check if this is a Pin event

Source

pub fn is_cow(&self) -> bool

Check if this is a Cow event

Source

pub fn is_thread(&self) -> bool

Check if this is a thread event

Source

pub fn is_channel(&self) -> bool

Check if this is a channel event

Source

pub fn is_once_cell(&self) -> bool

Check if this is a OnceCell/OnceLock event

Source

pub fn is_maybe_uninit(&self) -> bool

Check if this is a MaybeUninit event

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Event

Source§

fn eq(&self, other: &Event) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,