This commit is contained in:
nora 2022-09-15 22:10:15 +02:00
parent 9a3a68ad02
commit 694ce70ce3
3 changed files with 4 additions and 30 deletions

View file

@ -41,10 +41,6 @@ where
<D::Service as Service<Req>>::Future, <D::Service as Service<Req>>::Future,
fn(<D::Service as Service<Req>>::Error) -> crate::BoxError, fn(<D::Service as Service<Req>>::Error) -> crate::BoxError,
>; >;
fn poll_ready(&mut self) -> Poll<Result<(), Self::Error>> {
todo!()
}
} }
pub struct PoolDiscoverer<MS, Target, Request> pub struct PoolDiscoverer<MS, Target, Request>
@ -102,21 +98,12 @@ where
type Response = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Response; type Response = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Response;
type Error = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Error; type Error = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Error;
type Future = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Future; type Future = <PinBalance<PoolDiscoverer<MS, Target, Req>, Req> as Service<Req>>::Future;
fn poll_ready(&mut self) -> Poll<Result<(), Self::Error>> {
todo!()
}
} }
pub struct DropNotifyService<Svc> { pub struct DropNotifyService<Svc> {
svc: Svc, svc: Svc,
} }
impl<Svc> Drop for DropNotifyService<Svc> {
fn drop(&mut self) {
todo!()
}
}
impl<Svc: Load> Load for DropNotifyService<Svc> { impl<Svc: Load> Load for DropNotifyService<Svc> {
type Metric = Svc::Metric; type Metric = Svc::Metric;
@ -130,7 +117,4 @@ impl<Request, Svc: Service<Request>> Service<Request> for DropNotifyService<Svc>
type Future = Svc::Future; type Future = Svc::Future;
type Error = Svc::Error; type Error = Svc::Error;
fn poll_ready(&mut self) -> Poll<Result<(), Self::Error>> {
todo!()
}
} }

View file

@ -3,6 +3,8 @@
pub mod balance; pub mod balance;
pub mod make; pub mod make;
use std::future::Future;
use futures_core::TryStream;
pub trait Sealed<T> {} pub trait Sealed<T> {}
/// Alias for a type-erased error type. /// Alias for a type-erased error type.
@ -15,11 +17,6 @@ mod load {
} }
} }
use std::future::Future;
use std::task::Poll;
use futures_core::TryStream;
pub trait Discover { pub trait Discover {
type Key: Eq; type Key: Eq;
type Service; type Service;
@ -54,6 +51,4 @@ pub trait Service<Request> {
/// The future response value. /// The future response value.
type Future: Future<Output = Result<Self::Response, Self::Error>>; type Future: Future<Output = Result<Self::Response, Self::Error>>;
fn poll_ready(&mut self) -> Poll<Result<(), Self::Error>>;
} }

View file

@ -2,7 +2,6 @@
use crate::Sealed; use crate::Sealed;
use crate::Service; use crate::Service;
use std::task::Poll;
use std::convert::Infallible; use std::convert::Infallible;
@ -17,10 +16,6 @@ where
type Response = S; type Response = S;
type Error = Infallible; type Error = Infallible;
type Future = SharedFuture<S>; type Future = SharedFuture<S>;
fn poll_ready(&mut self) -> Poll<Result<(), Self::Error>> {
todo!()
}
} }
pub struct SharedFuture<S> { pub struct SharedFuture<S> {
@ -29,10 +24,10 @@ pub struct SharedFuture<S> {
impl<S> std::future::Future for SharedFuture<S> impl<S> std::future::Future for SharedFuture<S>
where where
futures_util::future::Ready<Result<S, Infallible>>: std::future::Future, std::future::Ready<Result<S, Infallible>>: std::future::Future,
{ {
type Output = type Output =
<futures_util::future::Ready<Result<S, Infallible>> as std::future::Future>::Output; <std::future::Ready<Result<S, Infallible>> as std::future::Future>::Output;
fn poll( fn poll(
self: std::pin::Pin<&mut Self>, self: std::pin::Pin<&mut Self>,