pub struct ExecutionResult {
pub batch_index: usize,
pub status: ExecutionStatus,
pub read_set: HashSet<(EntityId, EpochId)>,
pub write_set: HashSet<EntityId>,
pub dependencies: Vec<usize>,
pub reexecution_count: usize,
pub error: Option<String>,
}Expand description
Result of executing a single operation in the batch.
Fields§
§batch_index: usizeIndex in the batch (for ordering).
status: ExecutionStatusExecution status.
read_set: HashSet<(EntityId, EpochId)>Entities read during execution (entity_id, epoch_read_at).
write_set: HashSet<EntityId>Entities written during execution.
dependencies: Vec<usize>Dependencies on earlier transactions in the batch.
reexecution_count: usizeNumber of times this operation was re-executed.
error: Option<String>Error message if failed.
Implementations§
Source§impl ExecutionResult
impl ExecutionResult
Sourcepub fn record_read(&mut self, entity: EntityId, epoch: EpochId)
pub fn record_read(&mut self, entity: EntityId, epoch: EpochId)
Records a read operation.
Sourcepub fn record_write(&mut self, entity: EntityId)
pub fn record_write(&mut self, entity: EntityId)
Records a write operation.
Sourcepub fn mark_needs_revalidation(&mut self)
pub fn mark_needs_revalidation(&mut self)
Marks as needing revalidation.
Sourcepub fn mark_reexecuted(&mut self)
pub fn mark_reexecuted(&mut self)
Marks as reexecuted.
Sourcepub fn mark_failed(&mut self, error: String)
pub fn mark_failed(&mut self, error: String)
Marks as failed with an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionResult
impl RefUnwindSafe for ExecutionResult
impl Send for ExecutionResult
impl Sync for ExecutionResult
impl Unpin for ExecutionResult
impl UnsafeUnpin for ExecutionResult
impl UnwindSafe for ExecutionResult
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