pub struct AwaitSpec {
pub kind: String,
pub correlation: Vec<CorrelationKey>,
pub deadline: String,
pub from: Option<String>,
}Expand description
What a run is waiting for.
Fields§
§kind: String§correlation: Vec<CorrelationKey>§deadline: StringThe obligation that bounds this wait.
Mandatory by design. An unbounded wait is a run that can hang forever with nothing to notice it — the failure mode that presents as “the process just stalled” and is invisible until someone asks.
from: Option<String>The one producer whose event satisfies this wait, matched against
InboundEvent::source. Absent, any producer may.
Implementations§
Source§impl AwaitSpec
impl AwaitSpec
pub fn new(kind: impl Into<String>, deadline: impl Into<String>) -> Self
pub fn correlate(self, key: CorrelationKey) -> Self
Sourcepub fn from(self, source: impl Into<String>) -> Self
pub fn from(self, source: impl Into<String>) -> Self
Accept the event only from source, compared verbatim with
InboundEvent::source.
Correlation keys are business values another producer may know; a wait that names its sender cannot be consumed by an authenticated producer that merely guessed the kind and the key.
An event that arrives over the served API or A2A carries
peer:<actor>, the authenticated caller’s actor as the deployment’s
authenticator names it — a CloudEvent’s own source attribute is not
used. An event passed to Runtime::deliver
in process carries whatever source its caller built it with.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AwaitSpec
impl<'de> Deserialize<'de> for AwaitSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for AwaitSpec
Auto Trait Implementations§
impl Freeze for AwaitSpec
impl RefUnwindSafe for AwaitSpec
impl Send for AwaitSpec
impl Sync for AwaitSpec
impl Unpin for AwaitSpec
impl UnsafeUnpin for AwaitSpec
impl UnwindSafe for AwaitSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more