pub struct BalanceCtx<'a> {
pub service: &'a str,
pub affinity: Option<&'a AffinityKey<'a>>,
pub pool: &'a BackendPool,
pub candidates: CandidateSet<'a>,
}Fields§
§service: &'a str§affinity: Option<&'a AffinityKey<'a>>§pool: &'a BackendPool§candidates: CandidateSet<'a>Implementations§
Source§impl<'a> BalanceCtx<'a>
impl<'a> BalanceCtx<'a>
pub fn candidate_len(&self) -> usize
pub fn candidate_index(&self, nth: usize) -> Option<usize>
pub fn candidate_backend(&self, nth: usize) -> Option<BackendRef<'a>>
pub fn is_candidate(&self, backend_idx: usize) -> bool
Auto Trait Implementations§
impl<'a> Freeze for BalanceCtx<'a>
impl<'a> RefUnwindSafe for BalanceCtx<'a>
impl<'a> Send for BalanceCtx<'a>
impl<'a> Sync for BalanceCtx<'a>
impl<'a> Unpin for BalanceCtx<'a>
impl<'a> UnsafeUnpin for BalanceCtx<'a>
impl<'a> UnwindSafe for BalanceCtx<'a>
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