#[non_exhaustive]pub struct NexusOperationOptions {
pub endpoint: String,
pub service: String,
pub operation: String,
pub input: Option<Payload>,
pub schedule_to_close_timeout: Option<Duration>,
pub nexus_header: HashMap<String, String>,
pub cancellation_type: Option<NexusOperationCancellationType>,
pub cancellation_token: Option<WorkflowCancellationToken>,
pub schedule_to_start_timeout: Option<Duration>,
pub start_to_close_timeout: Option<Duration>,
}Expand description
Options for Nexus Operations
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.endpoint: StringEndpoint name, must exist in the endpoint registry or this command will fail.
service: StringService name.
operation: StringOperation name.
input: Option<Payload>Input for the operation. The server converts this into Nexus request content and the appropriate content headers internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the content is transformed back to the original Payload sent in this command.
schedule_to_close_timeout: Option<Duration>Schedule-to-close timeout for this operation. Indicates how long the caller is willing to wait for operation completion. Calls are retried internally by the server.
nexus_header: HashMap<String, String>Header to attach to the Nexus request. Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and transmitted to external services as-is. This is useful for propagating tracing information. Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads.
cancellation_type: Option<NexusOperationCancellationType>Cancellation type for the operation
cancellation_token: Option<WorkflowCancellationToken>Cancellation token for this operation. None inherits workflow cancellation.
schedule_to_start_timeout: Option<Duration>Schedule-to-start timeout for this operation. Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) by the handler. If the operation is not started within this timeout, it will fail with TIMEOUT_TYPE_SCHEDULE_TO_START. If not set or zero, no schedule-to-start timeout is enforced.
start_to_close_timeout: Option<Duration>Start-to-close timeout for this operation. Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been started. If the operation does not complete within this timeout after starting, it will fail with TIMEOUT_TYPE_START_TO_CLOSE. Only applies to asynchronous operations. Synchronous operations ignore this timeout. If not set or zero, no start-to-close timeout is enforced.
Implementations§
Source§impl NexusOperationOptions
impl NexusOperationOptions
Sourcepub fn builder() -> NexusOperationOptionsBuilder
pub fn builder() -> NexusOperationOptionsBuilder
Create an instance of NexusOperationOptions using the builder syntax
Trait Implementations§
Source§impl Clone for NexusOperationOptions
impl Clone for NexusOperationOptions
Source§fn clone(&self) -> NexusOperationOptions
fn clone(&self) -> NexusOperationOptions
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 !RefUnwindSafe for NexusOperationOptions
impl !Send for NexusOperationOptions
impl !Sync for NexusOperationOptions
impl !UnwindSafe for NexusOperationOptions
impl Freeze for NexusOperationOptions
impl Unpin for NexusOperationOptions
impl UnsafeUnpin for NexusOperationOptions
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