#[non_exhaustive]pub enum Strategy {
First,
Race,
Consensus {
min_agree: usize,
},
}Expand description
Strategy for resolving the public IP across multiple providers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
First
Try providers sequentially, return the first success.
Race
Race all providers concurrently, return the fastest success.
Consensus
Query all providers, require multiple to agree on the same IP.
Values of min_agree below 2 are clamped to 2 at build time,
since consensus with fewer than 2 providers is meaningless.
Trait Implementations§
impl Copy for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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