pub enum DispatchOrigin {
Engine,
OutboxRow {
dispatch_key: String,
},
}Expand description
Which caller staged a dispatch — and, because the two owe a waiting delivery different things, which abandonment condition applies to it.
§Why this is a named type rather than an optional dispatch key
An Option<String> whose presence selected the intent would be control flow
wearing configuration: an engine-scheduled activity that accidentally
acquired a key would silently become an outbox claim, and nothing would say
so. The same objection retires outbox.transport as a routing key, so
reintroducing its shape here would be a poor trade. With two named arms the
caller declares which it is, absence never decides, and the match in
send_to_candidates is exhaustive — a third origin cannot be added without
the compiler asking what it owes.
Variants§
Engine
Scheduled by the engine seam directly. There is no row and no claim, so the delivery is wanted while the deployment is not draining and the chosen worker is still registered.
OutboxRow
Claimed from the durable outbox by a pass that holds the row’s claim in the delivery gate. The delivery is wanted only while that claim stands — a term no transport can evaluate for itself, because a key that was never begun reads identically to one that was released.
Trait Implementations§
Source§impl Clone for DispatchOrigin
impl Clone for DispatchOrigin
Source§fn clone(&self) -> DispatchOrigin
fn clone(&self) -> DispatchOrigin
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DispatchOrigin
impl Debug for DispatchOrigin
impl Eq for DispatchOrigin
Source§impl PartialEq for DispatchOrigin
impl PartialEq for DispatchOrigin
impl StructuralPartialEq for DispatchOrigin
Auto Trait Implementations§
impl Freeze for DispatchOrigin
impl RefUnwindSafe for DispatchOrigin
impl Send for DispatchOrigin
impl Sync for DispatchOrigin
impl Unpin for DispatchOrigin
impl UnsafeUnpin for DispatchOrigin
impl UnwindSafe for DispatchOrigin
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
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