Event

Enum Event 

Source
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.

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

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

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0§

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§

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§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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>,