pub struct ProcessEffectOutcome<TResult = AnyValue> {
pub kind: ProcessEffectOutcomeKind,
pub effect_id: String,
pub effect_type: String,
pub value: Option<TResult>,
pub error: Option<String>,
pub reason: Option<String>,
pub command_id: Option<String>,
pub process_id: Option<String>,
pub correlation_id: Option<String>,
pub causation_id: Option<String>,
}Expand description
ProcessEffectOutcome data container.
Fields§
§kind: ProcessEffectOutcomeKindkind field for kind.
effect_id: Stringeffect_id field for effect id.
effect_type: Stringeffect_type field for effect type.
value: Option<TResult>value field for value.
error: Option<String>error field for error.
reason: Option<String>reason field for reason.
command_id: Option<String>command_id field for command id.
process_id: Option<String>process_id field for process id.
correlation_id: Option<String>correlation_id field for correlation id.
causation_id: Option<String>causation_id field for causation id.
Implementations§
Source§impl<TResult> ProcessEffectOutcome<TResult>
impl<TResult> ProcessEffectOutcome<TResult>
Sourcepub fn result(
effect_id: impl Into<String>,
effect_type: impl Into<String>,
value: TResult,
) -> Self
pub fn result( effect_id: impl Into<String>, effect_type: impl Into<String>, value: TResult, ) -> Self
Creates or computes result.
Sourcepub fn failure(
effect_id: impl Into<String>,
effect_type: impl Into<String>,
error: impl Into<String>,
) -> Self
pub fn failure( effect_id: impl Into<String>, effect_type: impl Into<String>, error: impl Into<String>, ) -> Self
Creates or computes failure.
Sourcepub fn cancel(
effect_id: impl Into<String>,
effect_type: impl Into<String>,
) -> Self
pub fn cancel( effect_id: impl Into<String>, effect_type: impl Into<String>, ) -> Self
Creates or computes cancel.
Sourcepub fn timeout(
effect_id: impl Into<String>,
effect_type: impl Into<String>,
error: impl Into<String>,
) -> Self
pub fn timeout( effect_id: impl Into<String>, effect_type: impl Into<String>, error: impl Into<String>, ) -> Self
Creates or computes timeout.
Sourcepub fn with_command_id(self, command_id: impl Into<String>) -> Self
pub fn with_command_id(self, command_id: impl Into<String>) -> Self
Updates or reads with_command_id.
Sourcepub fn with_process_id(self, process_id: impl Into<String>) -> Self
pub fn with_process_id(self, process_id: impl Into<String>) -> Self
Updates or reads with_process_id.
Sourcepub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
pub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
Updates or reads with_correlation_id.
Sourcepub fn with_causation_id(self, causation_id: impl Into<String>) -> Self
pub fn with_causation_id(self, causation_id: impl Into<String>) -> Self
Updates or reads with_causation_id.
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Updates or reads with_reason.
Trait Implementations§
Source§impl<TResult: Clone> Clone for ProcessEffectOutcome<TResult>
impl<TResult: Clone> Clone for ProcessEffectOutcome<TResult>
Source§fn clone(&self) -> ProcessEffectOutcome<TResult>
fn clone(&self) -> ProcessEffectOutcome<TResult>
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<TResult: Debug> Debug for ProcessEffectOutcome<TResult>
impl<TResult: Debug> Debug for ProcessEffectOutcome<TResult>
Source§impl<TResult: PartialEq> PartialEq for ProcessEffectOutcome<TResult>
impl<TResult: PartialEq> PartialEq for ProcessEffectOutcome<TResult>
Source§fn eq(&self, other: &ProcessEffectOutcome<TResult>) -> bool
fn eq(&self, other: &ProcessEffectOutcome<TResult>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<TResult> StructuralPartialEq for ProcessEffectOutcome<TResult>
Auto Trait Implementations§
impl<TResult> Freeze for ProcessEffectOutcome<TResult>where
TResult: Freeze,
impl<TResult> RefUnwindSafe for ProcessEffectOutcome<TResult>where
TResult: RefUnwindSafe,
impl<TResult> Send for ProcessEffectOutcome<TResult>where
TResult: Send,
impl<TResult> Sync for ProcessEffectOutcome<TResult>where
TResult: Sync,
impl<TResult> Unpin for ProcessEffectOutcome<TResult>where
TResult: Unpin,
impl<TResult> UnsafeUnpin for ProcessEffectOutcome<TResult>where
TResult: UnsafeUnpin,
impl<TResult> UnwindSafe for ProcessEffectOutcome<TResult>where
TResult: UnwindSafe,
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