pub struct LeastLoaded { /* private fields */ }Expand description
Deterministic selection of the lowest observed load.
Membership begins Unknown and is ineligible until typed versioned evidence
arrives. Ties use membership order. Unknown, stale, and same-version
conflicting evidence is rejected without mutation; identical evidence is
idempotent. Membership removal discards its evidence. These evidence and
tie rules are Bombay policy; gathering load remains an Environment concern.
Evidence follows the Router’s member order; only Router owns recipient
identity and exposes recipient-based lookup through Router::load_evidence.
Implementations§
Trait Implementations§
Source§impl Clone for LeastLoaded
impl Clone for LeastLoaded
Source§fn clone(&self) -> LeastLoaded
fn clone(&self) -> LeastLoaded
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LeastLoaded
impl Default for LeastLoaded
Source§impl<Route: DeliveryRoute + Clone + PartialEq> RoutingStrategy<Route> for LeastLoaded
impl<Route: DeliveryRoute + Clone + PartialEq> RoutingStrategy<Route> for LeastLoaded
Source§type Observation = LoadObservation<Route>
type Observation = LoadObservation<Route>
Closed observation type accepted by this policy.
Source§type Error = MemberEvidenceError
type Error = MemberEvidenceError
Concrete observation rejection reason.
Source§fn select(
&mut self,
members: &[Route],
_: &<Route::Protocol as Protocol>::Msg,
) -> Option<usize>
fn select( &mut self, members: &[Route], _: &<Route::Protocol as Protocol>::Msg, ) -> Option<usize>
Select at most one index from this exact typed membership snapshot. Read more
Source§fn observe(
&mut self,
members: &[Route],
observation: Self::Observation,
) -> Result<(), RoutingObservationRejection<Self::Observation, Self::Error>>
fn observe( &mut self, members: &[Route], observation: Self::Observation, ) -> Result<(), RoutingObservationRejection<Self::Observation, Self::Error>>
Fold one typed observation against the same membership snapshot. Read more
Auto Trait Implementations§
impl Freeze for LeastLoaded
impl RefUnwindSafe for LeastLoaded
impl Send for LeastLoaded
impl Sync for LeastLoaded
impl Unpin for LeastLoaded
impl UnsafeUnpin for LeastLoaded
impl UnwindSafe for LeastLoaded
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