pub struct LocalActivityOptions {
pub activity_id: Option<String>,
pub retry_policy: RetryPolicy,
pub attempt: Option<u32>,
pub original_schedule_time: Option<Timestamp>,
pub timer_backoff_threshold: Option<Duration>,
pub cancel_type: ActivityCancellationType,
pub schedule_to_close_timeout: Option<Duration>,
pub schedule_to_start_timeout: Option<Duration>,
pub start_to_close_timeout: Option<Duration>,
pub summary: Option<String>,
}Expand description
Options for scheduling a local activity
Fields§
§activity_id: Option<String>Identifier to use for tracking the activity in Workflow history.
The activityId can be accessed by the activity function.
Does not need to be unique.
If None use the context’s sequence number
retry_policy: RetryPolicyRetry policy
attempt: Option<u32>Override attempt number rather than using 1. Ideally we would not expose this in a released Rust SDK, but it’s needed for test.
original_schedule_time: Option<Timestamp>Override schedule time when doing timer backoff. Ideally we would not expose this in a released Rust SDK, but it’s needed for test.
timer_backoff_threshold: Option<Duration>Retry backoffs over this amount will use a timer rather than a local retry
cancel_type: ActivityCancellationTypeHow the activity will cancel
schedule_to_close_timeout: Option<Duration>Indicates how long the caller is willing to wait for local activity completion. Limits how long retries will be attempted. When not specified defaults to the workflow execution timeout (which may be unset).
schedule_to_start_timeout: Option<Duration>Limits time the local activity can idle internally before being executed. That can happen if
the worker is currently at max concurrent local activity executions. This timeout is always
non retryable as all a retry would achieve is to put it back into the same queue. Defaults
to schedule_to_close_timeout if not specified and that is set. Must be <=
schedule_to_close_timeout when set, if not, it will be clamped down.
start_to_close_timeout: Option<Duration>Maximum time the local activity is allowed to execute after the task is dispatched. This
timeout is always retryable. Either or both of schedule_to_close_timeout and this must be
specified. If set, this must be <= schedule_to_close_timeout, if not, it will be clamped
down.
summary: Option<String>Single-line summary for this activity that will appear in UI/CLI.
Trait Implementations§
Source§impl Clone for LocalActivityOptions
impl Clone for LocalActivityOptions
Source§fn clone(&self) -> LocalActivityOptions
fn clone(&self) -> LocalActivityOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocalActivityOptions
impl Debug for LocalActivityOptions
Source§impl Default for LocalActivityOptions
impl Default for LocalActivityOptions
Source§fn default() -> LocalActivityOptions
fn default() -> LocalActivityOptions
Auto Trait Implementations§
impl Freeze for LocalActivityOptions
impl RefUnwindSafe for LocalActivityOptions
impl Send for LocalActivityOptions
impl Sync for LocalActivityOptions
impl Unpin for LocalActivityOptions
impl UnsafeUnpin for LocalActivityOptions
impl UnwindSafe for LocalActivityOptions
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request