#[non_exhaustive]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 cancellation_token: Option<WorkflowCancellationToken>,
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>,
/* private fields */
}Expand description
Options for scheduling a local activity
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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
cancellation_token: Option<WorkflowCancellationToken>Cancellation token for this local activity. None inherits workflow cancellation.
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.
Implementations§
Source§impl LocalActivityOptions
impl LocalActivityOptions
Sourcepub fn builder() -> LocalActivityOptionsBuilder
pub fn builder() -> LocalActivityOptionsBuilder
Create an instance of LocalActivityOptions using the builder syntax
Trait Implementations§
Source§impl Clone for LocalActivityOptions
impl Clone for LocalActivityOptions
Source§fn clone(&self) -> LocalActivityOptions
fn clone(&self) -> LocalActivityOptions
1.0.0 (const: unstable) · 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 !RefUnwindSafe for LocalActivityOptions
impl !Send for LocalActivityOptions
impl !Sync for LocalActivityOptions
impl !UnwindSafe for LocalActivityOptions
impl Freeze for LocalActivityOptions
impl Unpin for LocalActivityOptions
impl UnsafeUnpin 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> 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