#[non_exhaustive]pub struct WorkflowContextView { /* private fields */ }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.
Implementations§
Source§impl WorkflowContextView
impl WorkflowContextView
Sourcepub fn workflow_id(&self) -> &str
pub fn workflow_id(&self) -> &str
Returns the workflow’s unique identifier.
Sourcepub fn workflow_type(&self) -> &str
pub fn workflow_type(&self) -> &str
Returns the workflow type name.
Sourcepub fn task_queue(&self) -> &str
pub fn task_queue(&self) -> &str
Returns the task queue this workflow is executing on.
Sourcepub fn first_execution_run_id(&self) -> &str
pub fn first_execution_run_id(&self) -> &str
Returns the run ID of the first execution in the chain.
Sourcepub fn continued_from_run_id(&self) -> Option<&str>
pub fn continued_from_run_id(&self) -> Option<&str>
Returns the run ID of the previous execution when this is a continuation.
Sourcepub fn start_time(&self) -> Option<SystemTime>
pub fn start_time(&self) -> Option<SystemTime>
Returns when the workflow execution started.
Sourcepub fn execution_timeout(&self) -> Option<Duration>
pub fn execution_timeout(&self) -> Option<Duration>
Returns the total workflow execution timeout, including retries and continue-as-new.
Sourcepub fn run_timeout(&self) -> Option<Duration>
pub fn run_timeout(&self) -> Option<Duration>
Returns the timeout of a single workflow run.
Sourcepub fn task_timeout(&self) -> Option<Duration>
pub fn task_timeout(&self) -> Option<Duration>
Returns the timeout of a single workflow task.
Sourcepub fn parent(&self) -> Option<NamespacedWorkflowInfo>
pub fn parent(&self) -> Option<NamespacedWorkflowInfo>
Returns information about the parent workflow when this is a child workflow.
Sourcepub fn root(&self) -> Option<WorkflowExecution>
pub fn root(&self) -> Option<WorkflowExecution>
Returns information about the root workflow in the execution chain.
Sourcepub fn retry_policy(&self) -> Option<RetryPolicy>
pub fn retry_policy(&self) -> Option<RetryPolicy>
Returns the workflow’s retry policy.
Sourcepub fn cron_schedule(&self) -> Option<&str>
pub fn cron_schedule(&self) -> Option<&str>
Returns the cron schedule when this workflow runs on one.
Sourcepub fn priority(&self) -> Priority
pub fn priority(&self) -> Priority
Returns priority and fairness configuration for this workflow execution.
Sourcepub fn search_attributes(&self) -> Option<SearchAttributes>
pub fn search_attributes(&self) -> Option<SearchAttributes>
Returns initial search attributes as a typed collection.
Sourcepub fn raw(&self) -> &InitializeWorkflow
pub fn raw(&self) -> &InitializeWorkflow
Accesses the underlying workflow initialization protobuf.
Sourcepub fn into_raw(self) -> InitializeWorkflow
pub fn into_raw(self) -> InitializeWorkflow
Consumes this view and returns the underlying workflow initialization protobuf.
Trait Implementations§
Source§impl Clone for WorkflowContextView
impl Clone for WorkflowContextView
Source§fn clone(&self) -> WorkflowContextView
fn clone(&self) -> WorkflowContextView
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 WorkflowContextView
impl !UnwindSafe for WorkflowContextView
impl Freeze for WorkflowContextView
impl Send for WorkflowContextView
impl Sync for WorkflowContextView
impl Unpin for WorkflowContextView
impl UnsafeUnpin 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> 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