pub struct StrategySelector { /* private fields */ }Expand description
Selects a CA backend according to the configured strategy.
Implementations§
Source§impl StrategySelector
impl StrategySelector
Sourcepub fn new(strategy: FailoverStrategy) -> Self
pub fn new(strategy: FailoverStrategy) -> Self
Create a selector for the given strategy.
Sourcepub fn select(
&self,
candidates: &[(&CaConnection, &CaStatus)],
) -> Option<CaConnection>
pub fn select( &self, candidates: &[(&CaConnection, &CaStatus)], ) -> Option<CaConnection>
Choose a CA from the available (healthy) candidates.
candidates must be non-empty; the caller filters out unhealthy CAs
before invoking this method.
Auto Trait Implementations§
impl !Freeze for StrategySelector
impl RefUnwindSafe for StrategySelector
impl Send for StrategySelector
impl Sync for StrategySelector
impl Unpin for StrategySelector
impl UnsafeUnpin for StrategySelector
impl UnwindSafe for StrategySelector
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more