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>
Source§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§async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
Source§fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
Polls service from the current task. Read more
Source§impl<T: Address, C> ServiceFactory<Connect<T>, C> for Resolver<T>
impl<T: Address, C> ServiceFactory<Connect<T>, C> for Resolver<T>
Source§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 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Service
Source§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