pub struct TraceEvent {
pub event_id: i64,
pub thread_id: i64,
pub operation: Operation,
pub memory_location: i64,
pub vector_clock: VectorClock,
}Expand description
Trace event from concurrent program execution.
Represents a single memory access event in a concurrent execution trace. Each event has a vector clock that captures its causal relationship to other events.
§Fields
event_id- Unique identifier for this eventthread_id- Thread that performed this operationoperation- Type of memory access (Read or Write)memory_location- Address or identifier of accessed memoryvector_clock- Partial order information for this event
Fields§
§event_id: i64Unique identifier for this event in the trace.
thread_id: i64Thread that performed this memory operation.
operation: OperationType of memory operation (read or write).
memory_location: i64Memory location being accessed. Can be a physical address or symbolic identifier.
vector_clock: VectorClockVector clock capturing causal ordering information.
Implementations§
Source§impl TraceEvent
impl TraceEvent
Sourcepub fn new(
event_id: i64,
thread_id: i64,
operation: Operation,
memory_location: i64,
vector_clock: VectorClock,
) -> Self
pub fn new( event_id: i64, thread_id: i64, operation: Operation, memory_location: i64, vector_clock: VectorClock, ) -> Self
Create a new trace event.
§Arguments
event_id- Unique event identifierthread_id- Thread performing the operationoperation- Read or Writememory_location- Location being accessedvector_clock- Cusal ordering information
Sourcepub fn with_thread(
event_id: i64,
thread_id: i64,
operation: Operation,
memory_location: i64,
) -> Self
pub fn with_thread( event_id: i64, thread_id: i64, operation: Operation, memory_location: i64, ) -> Self
Create a trace event with a fresh vector clock for a single thread.
Convenience function that creates a vector clock with a single thread’s clock set to 1.
§Arguments
event_id- Unique event identifierthread_id- Thread performing the operationoperation- Read or Writememory_location- Location being accessed
Trait Implementations§
Source§impl Clone for TraceEvent
impl Clone for TraceEvent
Source§fn clone(&self) -> TraceEvent
fn clone(&self) -> TraceEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceEvent
impl Debug for TraceEvent
Source§impl Hash for TraceEvent
impl Hash for TraceEvent
Source§impl PartialEq for TraceEvent
impl PartialEq for TraceEvent
impl Eq for TraceEvent
impl StructuralPartialEq for TraceEvent
Auto Trait Implementations§
impl Freeze for TraceEvent
impl RefUnwindSafe for TraceEvent
impl Send for TraceEvent
impl Sync for TraceEvent
impl Unpin for TraceEvent
impl UnsafeUnpin for TraceEvent
impl UnwindSafe for TraceEvent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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