pub struct Resolver { /* private fields */ }Expand description
Coordinates synchronous IP detection across configured providers.
Created via Resolver::new() with a Config.
Call resolve() to perform the lookup.
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn resolve(&self) -> Result<ProviderResult, Error>
pub fn resolve(&self) -> Result<ProviderResult, Error>
Resolve the public IP address synchronously using the configured strategy.
§Errors
Error::NoProvidersForVersion— no provider supports the requested IP version.Error::AllProvidersFailed— every provider either failed or timed out.Error::ConsensusNotReached— (consensus strategy) too few providers agreed.
Auto Trait Implementations§
impl !RefUnwindSafe for Resolver
impl !UnwindSafe for Resolver
impl Freeze for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
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