pub struct CatalogWorkflowDagBuilder<'a, 'catalog> { /* private fields */ }Expand description
Workflow DAG builder that validates job types against a JobCatalog.
Implementations§
Source§impl<'a, 'catalog> CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> CatalogWorkflowDagBuilder<'a, 'catalog>
Sourcepub fn organization_id(self, organization_id: Uuid) -> Self
pub fn organization_id(self, organization_id: Uuid) -> Self
Sets the organization scope for the workflow run and its steps by default.
Sourcepub fn clear_organization_id(self) -> Self
pub fn clear_organization_id(self) -> Self
Clears the workflow-level organization scope.
Sourcepub fn idempotency_key(self, idempotency_key: &'a str) -> Self
pub fn idempotency_key(self, idempotency_key: &'a str) -> Self
Sets the workflow idempotency key.
Sourcepub fn clear_idempotency_key(self) -> Self
pub fn clear_idempotency_key(self) -> Self
Clears the workflow idempotency key.
Sourcepub fn job(
self,
step_key: &'a str,
job_type_name: &str,
payload: &'a Value,
) -> Result<Self, CatalogError>
pub fn job( self, step_key: &'a str, job_type_name: &str, payload: &'a Value, ) -> Result<Self, CatalogError>
Adds a job step after validating job_type_name against enabled catalog entries.
§Errors
Returns CatalogError when the job type is unknown or disabled, or when
the underlying workflow builder rejects the step.
Sourcepub fn after_success<I>(
self,
step_key: &'a str,
prerequisites: I,
) -> Result<Self, CatalogError>where
I: IntoIterator<Item = &'a str>,
pub fn after_success<I>(
self,
step_key: &'a str,
prerequisites: I,
) -> Result<Self, CatalogError>where
I: IntoIterator<Item = &'a str>,
Adds success dependencies to an existing workflow step.
§Errors
Returns CatalogError::WorkflowBuild when the underlying workflow
builder rejects the dependency edge.
Sourcepub fn after_terminal<I>(
self,
step_key: &'a str,
prerequisites: I,
) -> Result<Self, CatalogError>where
I: IntoIterator<Item = &'a str>,
pub fn after_terminal<I>(
self,
step_key: &'a str,
prerequisites: I,
) -> Result<Self, CatalogError>where
I: IntoIterator<Item = &'a str>,
Adds terminal-state dependencies to an existing workflow step.
§Errors
Returns CatalogError::WorkflowBuild when the underlying workflow
builder rejects the dependency edge.
Sourcepub fn build(self) -> Result<WorkflowRunEnqueue<'a>, CatalogError>
pub fn build(self) -> Result<WorkflowRunEnqueue<'a>, CatalogError>
Builds the workflow enqueue payload.
This is an alias for Self::try_build.
§Errors
Returns CatalogError::WorkflowBuild when final workflow validation fails.
Sourcepub fn try_build(self) -> Result<WorkflowRunEnqueue<'a>, CatalogError>
pub fn try_build(self) -> Result<WorkflowRunEnqueue<'a>, CatalogError>
Builds the workflow enqueue payload.
§Errors
Returns CatalogError::WorkflowBuild when final workflow validation fails.
Trait Implementations§
Source§impl<'a, 'catalog> Clone for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> Clone for CatalogWorkflowDagBuilder<'a, 'catalog>
Source§fn clone(&self) -> CatalogWorkflowDagBuilder<'a, 'catalog>
fn clone(&self) -> CatalogWorkflowDagBuilder<'a, 'catalog>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a, 'catalog> Freeze for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> !RefUnwindSafe for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> Send for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> Sync for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> Unpin for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> UnsafeUnpin for CatalogWorkflowDagBuilder<'a, 'catalog>
impl<'a, 'catalog> !UnwindSafe for CatalogWorkflowDagBuilder<'a, 'catalog>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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