causality

Trait Cause

Source
pub trait Cause {
    type ActorId;
    type ActorVersion;

    // Required methods
    fn actor_id(&self) -> Self::ActorId;
    fn actor_version(&self) -> Self::ActorVersion;
}
Expand description

Action performed on Actor that is expected to produce Effects.

Implemented for actions handled by Actors.

Required Associated Types§

Source

type ActorId

Unique Actor Id or aggregate key.

Source

type ActorVersion

Version of Actor handling Cause for ordering (optimistic concurrency or staleness).

Required Methods§

Source

fn actor_id(&self) -> Self::ActorId

Returns unique Actor Id.

Source

fn actor_version(&self) -> Self::ActorVersion

Returns Actor version.

Implementors§