pub struct Resolver<T>(/* private fields */);Expand description
DNS Resolver Service
Implementations§
Trait Implementations§
source§impl<T: Address> Service<Connect<T>> for Resolver<T>
 
impl<T: Address> Service<Connect<T>> for Resolver<T>
§type Error = ConnectError
 
type Error = ConnectError
Errors produced by the service when polling readiness or executing call.
source§async fn call(
    &self,
    req: Connect<T>,
    _: ServiceCtx<'_, Self>
) -> Result<Connect<T>, Self::Error>
 
async fn call( &self, req: Connect<T>, _: ServiceCtx<'_, Self> ) -> Result<Connect<T>, Self::Error>
Process the request and return the response asynchronously. Read more
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
 
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns 
Ready when the service is able to process requests. Read moresource§impl<T: Address, C> ServiceFactory<Connect<T>, C> for Resolver<T>
 
impl<T: Address, C> ServiceFactory<Connect<T>, C> for Resolver<T>
§type Error = ConnectError
 
type Error = ConnectError
Errors produced by the created services.
source§async fn create(&self, _: C) -> Result<Self::Service, Self::InitError>
 
async fn create(&self, _: C) -> Result<Self::Service, Self::InitError>
Create and return a new service value asynchronously.
source§async fn pipeline(
    &self,
    cfg: Cfg
) -> Result<Pipeline<Self::Service>, Self::InitError>where
    Self: Sized,
 
async fn pipeline(
    &self,
    cfg: Cfg
) -> Result<Pipeline<Self::Service>, Self::InitError>where
    Self: Sized,
Create and return a new service value asynchronously and wrap into a container
source§fn map<F, Res>(
    self,
    f: F
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
 
fn map<F, Res>( self, f: F ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Map this service’s output to a different type, returning a new service
of the resulting type.
source§fn map_err<F, E>(
    self,
    f: F
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
 
fn map_err<F, E>( self, f: F ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Map this service’s error to a different error, returning a new service.
source§fn map_init_err<F, E>(
    self,
    f: F
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
 
fn map_init_err<F, E>( self, f: F ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Map this factory’s init error to a different error, returning a new service.
impl<T: Copy> Copy for Resolver<T>
Auto Trait Implementations§
impl<T> Freeze for Resolver<T>
impl<T> RefUnwindSafe for Resolver<T>where
    T: RefUnwindSafe,
impl<T> Send for Resolver<T>where
    T: Send,
impl<T> Sync for Resolver<T>where
    T: Sync,
impl<T> Unpin for Resolver<T>where
    T: Unpin,
impl<T> UnwindSafe for Resolver<T>where
    T: UnwindSafe,
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
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
    Svc: Service<Req>,
 
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
    Svc: Service<Req>,
source§fn into_service(self) -> Svc
 
fn into_service(self) -> Svc
Convert to a 
Servicesource§impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
    T: ServiceFactory<Req, Cfg>,
 
impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
    T: ServiceFactory<Req, Cfg>,
source§fn into_factory(self) -> T
 
fn into_factory(self) -> T
Convert 
Self to a ServiceFactory