pub struct QueryContext {
pub workflow_id: Option<String>,
pub run_id: Option<String>,
pub workflow_type: String,
pub run_status: Option<String>,
/* private fields */
}Expand description
Immutable state supplied to a registered query handler.
This context intentionally exposes no activity, signal-wait, or command APIs. Query handlers inspect committed history and return a value; query completion does not append an event or advance deterministic execution.
Fields§
§workflow_id: Option<String>§run_id: Option<String>§workflow_type: String§run_status: Option<String>Implementations§
Source§impl QueryContext
impl QueryContext
Sourcepub fn workflow_input(&self) -> &Value
pub fn workflow_input(&self) -> &Value
The normalized argument list used to start the workflow.
Sourcepub fn history_events(&self) -> &[HistoryEvent]
pub fn history_events(&self) -> &[HistoryEvent]
The immutable committed history used for this query snapshot.
Sourcepub fn signal_events(&self) -> &[QuerySignal]
pub fn signal_events(&self) -> &[QuerySignal]
All decoded signals in committed workflow order.
Trait Implementations§
Source§impl Clone for QueryContext
impl Clone for QueryContext
Source§fn clone(&self) -> QueryContext
fn clone(&self) -> QueryContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QueryContext
impl RefUnwindSafe for QueryContext
impl Send for QueryContext
impl Sync for QueryContext
impl Unpin for QueryContext
impl UnsafeUnpin for QueryContext
impl UnwindSafe for QueryContext
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
Mutably borrows from an owned value. Read more