pub struct ExampleSagaFlowInstance {
pub id: String,
pub status: ExampleSagaFlowStatus,
pub current_step: Option<ExampleSagaFlowStep>,
pub context: Value,
pub completed_steps: Vec<ExampleSagaFlowStep>,
pub error: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Instance of ExampleSaga flow execution
Fields§
§id: StringUnique instance ID
status: ExampleSagaFlowStatusCurrent status
current_step: Option<ExampleSagaFlowStep>Current step
context: ValueFlow context (variables)
completed_steps: Vec<ExampleSagaFlowStep>Completed steps
error: Option<String>Error if failed
created_at: DateTime<Utc>Created timestamp
updated_at: DateTime<Utc>Updated timestamp
Implementations§
Source§impl ExampleSagaFlowInstance
impl ExampleSagaFlowInstance
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if flow is complete
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if flow is running
Sourcepub fn set_context(&mut self, key: &str, value: Value)
pub fn set_context(&mut self, key: &str, value: Value)
Set a context variable
Sourcepub fn get_context(&self, key: &str) -> Option<&Value>
pub fn get_context(&self, key: &str) -> Option<&Value>
Get a context variable
Trait Implementations§
Source§impl Clone for ExampleSagaFlowInstance
impl Clone for ExampleSagaFlowInstance
Source§impl Debug for ExampleSagaFlowInstance
impl Debug for ExampleSagaFlowInstance
Source§impl<'de> Deserialize<'de> for ExampleSagaFlowInstance
impl<'de> Deserialize<'de> for ExampleSagaFlowInstance
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 Serialize for ExampleSagaFlowInstance
impl Serialize for ExampleSagaFlowInstance
Auto Trait Implementations§
impl Freeze for ExampleSagaFlowInstance
impl RefUnwindSafe for ExampleSagaFlowInstance
impl Send for ExampleSagaFlowInstance
impl Sync for ExampleSagaFlowInstance
impl Unpin for ExampleSagaFlowInstance
impl UnsafeUnpin for ExampleSagaFlowInstance
impl UnwindSafe for ExampleSagaFlowInstance
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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