Skip to main content

WorkflowStartOptionsBuilder

Struct WorkflowStartOptionsBuilder 

Source
pub struct WorkflowStartOptionsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> WorkflowStartOptionsBuilder<S>

Source

pub fn build(self) -> WorkflowStartOptions
where S: IsComplete,

Finish building and return the requested object

Source

pub fn id_reuse_policy( self, value: WorkflowIdReusePolicy, ) -> WorkflowStartOptionsBuilder<SetIdReusePolicy<S>>
where S::IdReusePolicy: IsUnset,

Optional (Some / Option setters). Default: <WorkflowIdReusePolicy as Default>::default().

Set the policy for reusing the workflow id

Source

pub fn maybe_id_reuse_policy( self, value: Option<WorkflowIdReusePolicy>, ) -> WorkflowStartOptionsBuilder<SetIdReusePolicy<S>>
where S::IdReusePolicy: IsUnset,

Optional (Some / Option setters). Default: <WorkflowIdReusePolicy as Default>::default().

Set the policy for reusing the workflow id

Source

pub fn id_conflict_policy( self, value: WorkflowIdConflictPolicy, ) -> WorkflowStartOptionsBuilder<SetIdConflictPolicy<S>>
where S::IdConflictPolicy: IsUnset,

Optional (Some / Option setters). Default: <WorkflowIdConflictPolicy as Default>::default().

Set the policy for how to resolve conflicts with running policies. NOTE: This is ignored for child workflows.

Source

pub fn maybe_id_conflict_policy( self, value: Option<WorkflowIdConflictPolicy>, ) -> WorkflowStartOptionsBuilder<SetIdConflictPolicy<S>>
where S::IdConflictPolicy: IsUnset,

Optional (Some / Option setters). Default: <WorkflowIdConflictPolicy as Default>::default().

Set the policy for how to resolve conflicts with running policies. NOTE: This is ignored for child workflows.

Source

pub fn execution_timeout( self, value: Duration, ) -> WorkflowStartOptionsBuilder<SetExecutionTimeout<S>>
where S::ExecutionTimeout: IsUnset,

Optional (Some / Option setters).

Optionally set the execution timeout for the workflow https://docs.temporal.io/workflows/#workflow-execution-timeout

Source

pub fn maybe_execution_timeout( self, value: Option<Duration>, ) -> WorkflowStartOptionsBuilder<SetExecutionTimeout<S>>
where S::ExecutionTimeout: IsUnset,

Optional (Some / Option setters).

Optionally set the execution timeout for the workflow https://docs.temporal.io/workflows/#workflow-execution-timeout

Source

pub fn run_timeout( self, value: Duration, ) -> WorkflowStartOptionsBuilder<SetRunTimeout<S>>
where S::RunTimeout: IsUnset,

Optional (Some / Option setters).

Optionally indicates the default run timeout for a workflow run

Source

pub fn maybe_run_timeout( self, value: Option<Duration>, ) -> WorkflowStartOptionsBuilder<SetRunTimeout<S>>
where S::RunTimeout: IsUnset,

Optional (Some / Option setters).

Optionally indicates the default run timeout for a workflow run

Source

pub fn task_timeout( self, value: Duration, ) -> WorkflowStartOptionsBuilder<SetTaskTimeout<S>>
where S::TaskTimeout: IsUnset,

Optional (Some / Option setters).

Optionally indicates the default task timeout for a workflow run

Source

pub fn maybe_task_timeout( self, value: Option<Duration>, ) -> WorkflowStartOptionsBuilder<SetTaskTimeout<S>>
where S::TaskTimeout: IsUnset,

Optional (Some / Option setters).

Optionally indicates the default task timeout for a workflow run

Source

pub fn cron_schedule( self, value: impl Into<String>, ) -> WorkflowStartOptionsBuilder<SetCronSchedule<S>>
where S::CronSchedule: IsUnset,

Optional (Some / Option setters).

Optionally set a cron schedule for the workflow

Source

pub fn maybe_cron_schedule( self, value: Option<impl Into<String>>, ) -> WorkflowStartOptionsBuilder<SetCronSchedule<S>>
where S::CronSchedule: IsUnset,

Optional (Some / Option setters).

Optionally set a cron schedule for the workflow

Source

pub fn search_attributes( self, value: HashMap<String, Payload>, ) -> WorkflowStartOptionsBuilder<SetSearchAttributes<S>>
where S::SearchAttributes: IsUnset,

Optional (Some / Option setters).

Optionally associate extra search attributes with a workflow

Source

pub fn maybe_search_attributes( self, value: Option<HashMap<String, Payload>>, ) -> WorkflowStartOptionsBuilder<SetSearchAttributes<S>>
where S::SearchAttributes: IsUnset,

Optional (Some / Option setters).

Optionally associate extra search attributes with a workflow

Source

pub fn enable_eager_workflow_start( self, value: bool, ) -> WorkflowStartOptionsBuilder<SetEnableEagerWorkflowStart<S>>
where S::EnableEagerWorkflowStart: IsUnset,

Optional (Some / Option setters). Default: false.

Optionally enable Eager Workflow Start, a latency optimization using local workers NOTE: Experimental

Source

pub fn maybe_enable_eager_workflow_start( self, value: Option<bool>, ) -> WorkflowStartOptionsBuilder<SetEnableEagerWorkflowStart<S>>
where S::EnableEagerWorkflowStart: IsUnset,

Optional (Some / Option setters). Default: false.

Optionally enable Eager Workflow Start, a latency optimization using local workers NOTE: Experimental

Source

pub fn retry_policy( self, value: RetryPolicy, ) -> WorkflowStartOptionsBuilder<SetRetryPolicy<S>>
where S::RetryPolicy: IsUnset,

Optional (Some / Option setters).

Optionally set a retry policy for the workflow

Source

pub fn maybe_retry_policy( self, value: Option<RetryPolicy>, ) -> WorkflowStartOptionsBuilder<SetRetryPolicy<S>>
where S::RetryPolicy: IsUnset,

Optional (Some / Option setters).

Optionally set a retry policy for the workflow

Source

pub fn start_signal( self, value: WorkflowStartSignal, ) -> WorkflowStartOptionsBuilder<SetStartSignal<S>>
where S::StartSignal: IsUnset,

Optional (Some / Option setters).

If set, send a signal to the workflow atomically with start. The workflow will receive this signal before its first task.

Source

pub fn maybe_start_signal( self, value: Option<WorkflowStartSignal>, ) -> WorkflowStartOptionsBuilder<SetStartSignal<S>>
where S::StartSignal: IsUnset,

Optional (Some / Option setters).

If set, send a signal to the workflow atomically with start. The workflow will receive this signal before its first task.

Optional (Some / Option setters). Default: <Vec<common::v1::Link> as Default>::default().

Links to associate with the workflow. Ex: References to a nexus operation.

Optional (Some / Option setters). Default: <Vec<common::v1::Link> as Default>::default().

Links to associate with the workflow. Ex: References to a nexus operation.

Source

pub fn completion_callbacks( self, value: Vec<Callback>, ) -> WorkflowStartOptionsBuilder<SetCompletionCallbacks<S>>
where S::CompletionCallbacks: IsUnset,

Optional (Some / Option setters). Default: <Vec<common::v1::Callback> as Default>::default().

Callbacks that will be invoked upon workflow completion. For, ex, completing nexus operations.

Source

pub fn maybe_completion_callbacks( self, value: Option<Vec<Callback>>, ) -> WorkflowStartOptionsBuilder<SetCompletionCallbacks<S>>
where S::CompletionCallbacks: IsUnset,

Optional (Some / Option setters). Default: <Vec<common::v1::Callback> as Default>::default().

Callbacks that will be invoked upon workflow completion. For, ex, completing nexus operations.

Source

pub fn priority( self, value: Priority, ) -> WorkflowStartOptionsBuilder<SetPriority<S>>
where S::Priority: IsUnset,

Optional (Some / Option setters). Default: <Priority as Default>::default().

Priority for the workflow. Defaults to all-inherited (empty).

Source

pub fn maybe_priority( self, value: Option<Priority>, ) -> WorkflowStartOptionsBuilder<SetPriority<S>>
where S::Priority: IsUnset,

Optional (Some / Option setters). Default: <Priority as Default>::default().

Priority for the workflow. Defaults to all-inherited (empty).

Source

pub fn header(self, value: Header) -> WorkflowStartOptionsBuilder<SetHeader<S>>
where S::Header: IsUnset,

Optional (Some / Option setters).

Headers to include with the start request.

Source

pub fn maybe_header( self, value: Option<Header>, ) -> WorkflowStartOptionsBuilder<SetHeader<S>>
where S::Header: IsUnset,

Optional (Some / Option setters).

Headers to include with the start request.

Auto Trait Implementations§

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> 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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,