pub enum SelectionStrategy {
RoundRobin,
Priority,
WeightedRoundRobin {
weights: Vec<u32>,
},
LatencyBased,
Sticky {
key: String,
},
}Expand description
A selection strategy decides which provider index to use next.
Variants§
RoundRobin
Round-robin across all allowed providers.
Priority
Try providers in priority order (based on their registration order).
WeightedRoundRobin
Weighted round-robin — higher weight gets more traffic.
LatencyBased
Route to the provider with the lowest observed latency.
Sticky
Stick to the same provider for a given key (e.g. sender address).
Trait Implementations§
Source§impl Clone for SelectionStrategy
impl Clone for SelectionStrategy
Source§fn clone(&self) -> SelectionStrategy
fn clone(&self) -> SelectionStrategy
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 Debug for SelectionStrategy
impl Debug for SelectionStrategy
Source§impl Default for SelectionStrategy
impl Default for SelectionStrategy
Source§fn default() -> SelectionStrategy
fn default() -> SelectionStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SelectionStrategy
impl RefUnwindSafe for SelectionStrategy
impl Send for SelectionStrategy
impl Sync for SelectionStrategy
impl Unpin for SelectionStrategy
impl UnsafeUnpin for SelectionStrategy
impl UnwindSafe for SelectionStrategy
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