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 replay_now(&self) -> Result<DateTime<Utc>>
pub fn replay_now(&self) -> Result<DateTime<Utc>>
Recorded time of this immutable, engine-correlated callback prefix.
Missing, invalid or unproved boundary evidence is explicitly unavailable. Reading this accessor does not change the snapshot or append history.
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 workflow_input_avro_value(&self) -> &AvroValue
pub fn workflow_input_avro_value(&self) -> &AvroValue
The lossless fixed Avro Value 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
Auto Trait Implementations§
impl Forget for QueryContext
impl Freeze for QueryContextwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<AvroValue>: Freeze,
*const LeafNode<String, AvroValue> is !null: Freeze,
PhantomData<Box<(String, AvroValue)>>: Freeze,
*const ArcInner<Vec<HistoryEvent>> is !null: Freeze,
PhantomData<ArcInner<Vec<HistoryEvent>>>: Freeze,
*const ArcInner<Vec<QuerySignal>> is !null: Freeze,
PhantomData<ArcInner<Vec<QuerySignal>>>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
impl Move for QueryContext
impl RefUnwindSafe for QueryContext
impl Send for QueryContext
impl Sync for QueryContext
impl Unpin for QueryContext
impl UnsafeUnpin for QueryContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<AvroValue>: UnsafeUnpin,
*const LeafNode<String, AvroValue> is !null: UnsafeUnpin,
PhantomData<Box<(String, AvroValue)>>: UnsafeUnpin,
*const ArcInner<Vec<HistoryEvent>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<HistoryEvent>>>: UnsafeUnpin,
*const ArcInner<Vec<QuerySignal>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<QuerySignal>>>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
impl UnwindSafe for QueryContextwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, AvroValue>: UnwindSafe,
Arc<Vec<HistoryEvent>>: UnwindSafe,
Arc<Vec<QuerySignal>>: UnwindSafe,
NonZero<i32>: UnwindSafe,
Utc: UnwindSafe,
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