pub struct PropagatedHistory {
pub scope: HistoryPropagationScope,
pub events: Vec<HistoryEvent>,
pub chunks: Vec<PropagatedHistoryChunk>,
}Expand description
Propagated execution history delivered to a child workflow or activity.
Use PropagatedHistory::events for the flat event stream, or any of the
events_by_* / workflow_by_name filters to slice it by chunk metadata.
Fields§
§scope: HistoryPropagationScopeThe propagation scope the parent used when scheduling this work item.
events: Vec<HistoryEvent>All propagated events flattened in execution order.
chunks: Vec<PropagatedHistoryChunk>Per-app/per-instance chunk metadata.
Implementations§
Source§impl PropagatedHistory
impl PropagatedHistory
Sourcepub fn from_proto(p: PropagatedHistory) -> Option<Self>
pub fn from_proto(p: PropagatedHistory) -> Option<Self>
Build a PropagatedHistory from the wire-format proto.
Returns None if the proto’s scope is SCOPE_NONE (no propagation
happened) or unknown. Each chunk’s raw bytes are decoded once into
typed HistoryEvents; malformed events are
silently dropped (the chunk’s event_count reflects the original wire
count so the caller can detect drift).
Sourcepub fn app_ids(&self) -> Vec<String>
pub fn app_ids(&self) -> Vec<String>
Deduplicated list of app IDs in the propagated chain, in chunk order (earliest ancestor first).
Sourcepub fn workflow_by_name(
&self,
name: &str,
) -> Result<&PropagatedHistoryChunk, PropagationNotFoundError>
pub fn workflow_by_name( &self, name: &str, ) -> Result<&PropagatedHistoryChunk, PropagationNotFoundError>
Return the chunk produced by a workflow with the given function name.
If multiple chunks share the same name (re-entrant ancestor calls) the first match in chain order is returned.
Sourcepub fn events_by_app_id(
&self,
app_id: &str,
) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
pub fn events_by_app_id( &self, app_id: &str, ) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
All events from chunks tagged with the given Dapr app ID.
Sourcepub fn events_by_instance_id(
&self,
instance_id: &str,
) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
pub fn events_by_instance_id( &self, instance_id: &str, ) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
All events from the chunk with the given instance ID.
Sourcepub fn events_by_workflow_name(
&self,
name: &str,
) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
pub fn events_by_workflow_name( &self, name: &str, ) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>
All events from chunks produced by a workflow with the given function name.
Trait Implementations§
Source§impl Clone for PropagatedHistory
impl Clone for PropagatedHistory
Source§fn clone(&self) -> PropagatedHistory
fn clone(&self) -> PropagatedHistory
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 Freeze for PropagatedHistory
impl RefUnwindSafe for PropagatedHistory
impl Send for PropagatedHistory
impl Sync for PropagatedHistory
impl Unpin for PropagatedHistory
impl UnsafeUnpin for PropagatedHistory
impl UnwindSafe for PropagatedHistory
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> 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