pub enum Event {
Show 25 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,
},
}Expand description
An ownership or borrowing event recorded at runtime.
Variants§
New
Variable created via track_new.
Borrow
Variable borrowed via track_borrow.
Move
Ownership moved via track_move.
Drop
Variable dropped via track_drop.
RcNew
Rc::new allocation with reference counting.
Fields
RcClone
Rc::clone operation (shared ownership).
Fields
ArcNew
Arc::new allocation with atomic reference counting
Fields
ArcClone
Arc::clone operation (thread-safe shared ownership)
Fields
RefCellNew
RefCell::new allocation
RefCellBorrow
RefCell::borrow or borrow_mut operation
RefCellDrop
RefCell borrow dropped (Ref/RefMut dropped)
CellNew
Cell::new allocation
CellGet
Cell::get operation
CellSet
Cell::set operation
StaticInit
Static variable initialization
StaticAccess
Static variable access (read or write)
ConstEval
Const evaluation (compile-time constant)
RawPtrCreated
Raw pointer created
Fields
RawPtrDeref
Raw pointer dereferenced
UnsafeBlockEnter
Unsafe block entered
UnsafeBlockExit
Unsafe block exited
UnsafeFnCall
Unsafe function called
FfiCall
FFI (Foreign Function Interface) call
Transmute
Transmute operation
UnionFieldAccess
Union field access
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_refcounted(&self) -> bool
pub fn is_refcounted(&self) -> bool
Check if this is a reference-counted event
Sourcepub fn is_refcell(&self) -> bool
pub fn is_refcell(&self) -> bool
Check if this is a RefCell event
Sourcepub fn is_interior_mutability(&self) -> bool
pub fn is_interior_mutability(&self) -> bool
Check if this is an interior mutability event
Sourcepub fn is_raw_ptr(&self) -> bool
pub fn is_raw_ptr(&self) -> bool
Check if this is a raw pointer event
Sourcepub fn strong_count(&self) -> Option<usize>
pub fn strong_count(&self) -> Option<usize>
Get strong count if this is a reference-counted event
Sourcepub fn weak_count(&self) -> Option<usize>
pub fn weak_count(&self) -> Option<usize>
Get weak count if this is a reference-counted event
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)