pub struct Resolver { /* private fields */ }Expand description
Coordinates 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 async fn resolve(&self) -> Result<ProviderResult, Error>
pub async fn resolve(&self) -> Result<ProviderResult, Error>
Resolve the public IP address 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 Freeze for Resolver
impl !RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
impl !UnwindSafe 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