Skip to main content

PropagatedHistory

Struct PropagatedHistory 

Source
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: HistoryPropagationScope

The 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

Source

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).

Source

pub fn app_ids(&self) -> Vec<String>

Deduplicated list of app IDs in the propagated chain, in chunk order (earliest ancestor first).

Source

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.

Source

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.

Source

pub fn events_by_instance_id( &self, instance_id: &str, ) -> Result<Vec<HistoryEvent>, PropagationNotFoundError>

All events from the chunk with the given instance ID.

Source

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

Source§

fn clone(&self) -> PropagatedHistory

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PropagatedHistory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more