pub struct FlowInstance<S>{
pub id: String,
pub status: FlowStatus,
pub current_step: Option<S>,
pub context: Value,
pub completed_steps: Vec<S>,
pub error: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
Expand description
Generic workflow instance parametrised over the step enum S.
Generated files use a type alias:
pub type OrderProcessingFlowInstance = FlowInstance<OrderProcessingFlowStep>;
Fields§
§id: Stringnothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
status: FlowStatusnothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
current_step: Option<S>nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
context: Valuenothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
completed_steps: Vec<S>nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
error: Option<String>nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
created_at: DateTime<Utc>nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
updated_at: DateTime<Utc>nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
Implementations§
Source§impl<S> FlowInstance<S>
impl<S> FlowInstance<S>
pub fn new(id: impl Into<String>) -> Self
pub fn is_complete(&self) -> bool
pub fn is_running(&self) -> bool
pub fn set_context(&mut self, key: &str, value: Value)
pub fn get_context(&self, key: &str) -> Option<&Value>
Trait Implementations§
Source§impl<S> Clone for FlowInstance<S>
impl<S> Clone for FlowInstance<S>
Source§impl<S> Debug for FlowInstance<S>
impl<S> Debug for FlowInstance<S>
Source§impl<'de, S> Deserialize<'de> for FlowInstance<S>
impl<'de, S> Deserialize<'de> for FlowInstance<S>
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>,
Source§impl<S> Serialize for FlowInstance<S>
impl<S> Serialize for FlowInstance<S>
Source§impl<S> WorkflowContext<FlowInstance<S>> for FlowInstance<S>
impl<S> WorkflowContext<FlowInstance<S>> for FlowInstance<S>
Source§fn entity(&self) -> &FlowInstance<S>
fn entity(&self) -> &FlowInstance<S>
nothing used it; declared workflows run through backbone_core::workflow (WorkflowSpec, WorkflowDefinition and WorkflowEngine)
Auto Trait Implementations§
impl<S> Freeze for FlowInstance<S>
impl<S> RefUnwindSafe for FlowInstance<S>
impl<S> Send for FlowInstance<S>
impl<S> Sync for FlowInstance<S>
impl<S> Unpin for FlowInstance<S>
impl<S> UnsafeUnpin for FlowInstance<S>
impl<S> UnwindSafe for FlowInstance<S>
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
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> ⓘ
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> ⓘ
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