pub struct DispatchWorker {
pub worker_id: String,
pub participant: ParticipantPid,
pub consumer_state: ConsumerStateView,
}Expand description
Worker process visible to one dispatch routing decision.
Fields§
§worker_id: StringStable worker identity used by routing decisions and recorded events.
participant: ParticipantPidBeamr process identifier linked into the dispatch conversation.
consumer_state: ConsumerStateViewCapacity and affinity view presented to the configured routing function.
Implementations§
Source§impl DispatchWorker
impl DispatchWorker
Sourcepub fn new(worker_id: impl Into<String>, participant: ParticipantPid) -> Self
pub fn new(worker_id: impl Into<String>, participant: ParticipantPid) -> Self
Creates a worker with a one-slot capacity view.
Sourcepub fn with_consumer_state(
worker_id: impl Into<String>,
participant: ParticipantPid,
consumer_state: ConsumerStateView,
) -> Self
pub fn with_consumer_state( worker_id: impl Into<String>, participant: ParticipantPid, consumer_state: ConsumerStateView, ) -> Self
Creates a worker with an explicit routing view.
Trait Implementations§
Source§impl Clone for DispatchWorker
impl Clone for DispatchWorker
Source§fn clone(&self) -> DispatchWorker
fn clone(&self) -> DispatchWorker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchWorker
impl Debug for DispatchWorker
impl Eq for DispatchWorker
Source§impl PartialEq for DispatchWorker
impl PartialEq for DispatchWorker
Source§fn eq(&self, other: &DispatchWorker) -> bool
fn eq(&self, other: &DispatchWorker) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DispatchWorker
Auto Trait Implementations§
impl Freeze for DispatchWorker
impl RefUnwindSafe for DispatchWorker
impl Send for DispatchWorker
impl Sync for DispatchWorker
impl Unpin for DispatchWorker
impl UnsafeUnpin for DispatchWorker
impl UnwindSafe for DispatchWorker
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
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§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
Compare self to
key and return true if they are equal.