#[non_exhaustive]pub struct WorkflowContextView {Show 18 fields
pub workflow_id: String,
pub run_id: String,
pub workflow_type: String,
pub task_queue: String,
pub namespace: String,
pub attempt: u32,
pub first_execution_run_id: String,
pub continued_from_run_id: Option<String>,
pub start_time: Option<SystemTime>,
pub execution_timeout: Option<Duration>,
pub run_timeout: Option<Duration>,
pub task_timeout: Option<Duration>,
pub parent: Option<ParentWorkflowInfo>,
pub root: Option<RootWorkflowInfo>,
pub retry_policy: Option<RetryPolicy>,
pub cron_schedule: Option<String>,
pub memo: Option<Memo>,
pub search_attributes: Option<SearchAttributes>,
}Expand description
Read-only view of workflow context for use in init and query handlers.
This provides access to workflow information but cannot issue commands.
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.workflow_id: StringThe workflow’s unique identifier
run_id: StringThe run id of this workflow execution
workflow_type: StringThe workflow type name
task_queue: StringThe task queue this workflow is executing on
namespace: StringThe namespace this workflow is executing in
attempt: u32The current attempt number (starting from 1)
first_execution_run_id: StringThe run id of the very first execution in the chain
continued_from_run_id: Option<String>The run id of the previous execution if this is a continuation
start_time: Option<SystemTime>When the workflow execution started
execution_timeout: Option<Duration>Total workflow execution timeout including retries and continue as new
run_timeout: Option<Duration>Timeout of a single workflow run
task_timeout: Option<Duration>Timeout of a single workflow task
parent: Option<ParentWorkflowInfo>Information about the parent workflow, if this is a child workflow
root: Option<RootWorkflowInfo>Information about the root workflow in the execution chain
retry_policy: Option<RetryPolicy>The workflow’s retry policy
cron_schedule: Option<String>If this workflow runs on a cron schedule
memo: Option<Memo>User-defined memo
search_attributes: Option<SearchAttributes>Initial search attributes
Trait Implementations§
Source§impl Clone for WorkflowContextView
impl Clone for WorkflowContextView
Source§fn clone(&self) -> WorkflowContextView
fn clone(&self) -> WorkflowContextView
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowContextView
impl RefUnwindSafe for WorkflowContextView
impl Send for WorkflowContextView
impl Sync for WorkflowContextView
impl Unpin for WorkflowContextView
impl UnsafeUnpin for WorkflowContextView
impl UnwindSafe for WorkflowContextView
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