pub struct CommandEnvelope {Show 14 fields
pub command_id: CommandId,
pub project_id: ProjectId,
pub command_type: String,
pub schema_version: u32,
pub issued_at: Timestamp,
pub actor: Actor,
pub origin: Origin,
pub target_aggregate_type: Option<String>,
pub target_aggregate_id: Option<AggregateId>,
pub expected_version: Option<u32>,
pub idempotency_key: IdempotencyKey,
pub causation_id: Option<EventId>,
pub correlation_id: Option<CorrelationId>,
pub payload: Value,
}Expand description
One issued command. Commands are requests — only the events they cause are
truth. idempotency_key is required: reissuing the same key is a no-op.
Fields§
§command_id: CommandId§project_id: ProjectId§command_type: StringOPEN bounded string naming the command (e.g. cancel_attempt).
schema_version: u32§issued_at: Timestamp§actor: Actor§origin: Origin§target_aggregate_type: Option<String>§target_aggregate_id: Option<AggregateId>§expected_version: Option<u32>CAS precondition: the target aggregate’s current version.
idempotency_key: IdempotencyKey§causation_id: Option<EventId>§correlation_id: Option<CorrelationId>§payload: ValueTrait Implementations§
Source§impl Clone for CommandEnvelope
impl Clone for CommandEnvelope
Source§fn clone(&self) -> CommandEnvelope
fn clone(&self) -> CommandEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandEnvelope
impl Debug for CommandEnvelope
Source§impl<'de> Deserialize<'de> for CommandEnvelope
impl<'de> Deserialize<'de> for CommandEnvelope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CommandEnvelope
impl PartialEq for CommandEnvelope
Source§impl Serialize for CommandEnvelope
impl Serialize for CommandEnvelope
impl StructuralPartialEq for CommandEnvelope
Auto Trait Implementations§
impl Freeze for CommandEnvelope
impl RefUnwindSafe for CommandEnvelope
impl Send for CommandEnvelope
impl Sync for CommandEnvelope
impl Unpin for CommandEnvelope
impl UnsafeUnpin for CommandEnvelope
impl UnwindSafe for CommandEnvelope
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