Skip to main content

CatalogWorkflowDagBuilder

Struct CatalogWorkflowDagBuilder 

Source
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>

Source

pub fn organization_id(self, organization_id: Uuid) -> Self

Sets the organization scope for the workflow run and its steps by default.

Source

pub fn clear_organization_id(self) -> Self

Clears the workflow-level organization scope.

Source

pub fn idempotency_key(self, idempotency_key: &'a str) -> Self

Sets the workflow idempotency key.

Source

pub fn clear_idempotency_key(self) -> Self

Clears the workflow idempotency key.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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>

Source§

fn clone(&self) -> CatalogWorkflowDagBuilder<'a, 'catalog>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, 'catalog> Debug for CatalogWorkflowDagBuilder<'a, 'catalog>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more