Trait tower::discover::Discover [−][src]
Provide a uniform set of services able to satisfy a request.
This set of services may be updated over time. On each change to the set, a
new NewServiceSet
is yielded by Discover
.
See crate documentation for more details.
Associated Types
type Key: Hash + Eq
[src]
NewService key
type Service
[src]
The type of Service
yielded by this Discover
.
type Error
[src]
Error produced during discovery
Required methods
pub fn poll_discover(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Change<Self::Key, Self::Service>, Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Change<Self::Key, Self::Service>, Self::Error>>
Yields the next discovery change set.
Implementations on Foreign Types
impl<'_, D> Discover for &'_ mut D where
D: Discover + Unpin + ?Sized,
[src]
D: Discover + Unpin + ?Sized,
type Key = <D as Discover>::Key
type Service = <D as Discover>::Service
type Error = <D as Discover>::Error
pub fn poll_discover(
self: Pin<&mut &'_ mut D>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<&'_ mut D as Discover>::Key, <&'_ mut D as Discover>::Service>, <&'_ mut D as Discover>::Error>>
[src]
self: Pin<&mut &'_ mut D>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<&'_ mut D as Discover>::Key, <&'_ mut D as Discover>::Service>, <&'_ mut D as Discover>::Error>>
impl<D> Discover for Box<D, Global> where
D: Discover + Unpin + ?Sized,
[src]
D: Discover + Unpin + ?Sized,
type Key = <D as Discover>::Key
type Service = <D as Discover>::Service
type Error = <D as Discover>::Error
pub fn poll_discover(
self: Pin<&mut Box<D, Global>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<Box<D, Global> as Discover>::Key, <Box<D, Global> as Discover>::Service>, <Box<D, Global> as Discover>::Error>>
[src]
self: Pin<&mut Box<D, Global>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<Box<D, Global> as Discover>::Key, <Box<D, Global> as Discover>::Service>, <Box<D, Global> as Discover>::Error>>
impl<P> Discover for Pin<P> where
P: Unpin + DerefMut,
<P as Deref>::Target: Discover,
[src]
P: Unpin + DerefMut,
<P as Deref>::Target: Discover,
type Key = <<P as Deref>::Target as Discover>::Key
type Service = <<P as Deref>::Target as Discover>::Service
type Error = <<P as Deref>::Target as Discover>::Error
pub fn poll_discover(
self: Pin<&mut Pin<P>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<Pin<P> as Discover>::Key, <Pin<P> as Discover>::Service>, <Pin<P> as Discover>::Error>>
[src]
self: Pin<&mut Pin<P>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<Pin<P> as Discover>::Key, <Pin<P> as Discover>::Service>, <Pin<P> as Discover>::Error>>
impl<D, I> Discover for PendingRequestsDiscover<D, I> where
I: Clone,
D: Discover,
[src]
I: Clone,
D: Discover,
type Key = <D as Discover>::Key
type Service = PendingRequests<<D as Discover>::Service, I>
type Error = <D as Discover>::Error
pub fn poll_discover(
self: Pin<&mut PendingRequestsDiscover<D, I>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <PendingRequestsDiscover<D, I> as Discover>::Service>, <D as Discover>::Error>>
[src]
self: Pin<&mut PendingRequestsDiscover<D, I>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <PendingRequestsDiscover<D, I> as Discover>::Service>, <D as Discover>::Error>>
Yields the next discovery change set.
impl<D, I> Discover for PeakEwmaDiscover<D, I> where
I: Clone,
D: Discover,
[src]
I: Clone,
D: Discover,
type Key = <D as Discover>::Key
type Service = PeakEwma<<D as Discover>::Service, I>
type Error = <D as Discover>::Error
pub fn poll_discover(
self: Pin<&mut PeakEwmaDiscover<D, I>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <PeakEwmaDiscover<D, I> as Discover>::Service>, <D as Discover>::Error>>
[src]
self: Pin<&mut PeakEwmaDiscover<D, I>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <PeakEwmaDiscover<D, I> as Discover>::Service>, <D as Discover>::Error>>
impl<D, M> Discover for Constant<D, M> where
M: Copy,
D: Discover + Unpin,
[src]
M: Copy,
D: Discover + Unpin,
Proxies Discover
such that all changes are wrapped with a constant load.
type Key = <D as Discover>::Key
type Service = Constant<<D as Discover>::Service, M>
type Error = <D as Discover>::Error
pub fn poll_discover(
self: Pin<&mut Constant<D, M>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <Constant<D, M> as Discover>::Service>, <D as Discover>::Error>>
[src]
self: Pin<&mut Constant<D, M>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<D as Discover>::Key, <Constant<D, M> as Discover>::Service>, <D as Discover>::Error>>
Yields the next discovery change set.
Implementors
impl<S, K, Svc> Discover for ServiceStream<S> where
S: TryStream<Ok = Change<K, Svc>>,
K: Hash + Eq,
[src]
S: TryStream<Ok = Change<K, Svc>>,
K: Hash + Eq,
type Key = K
type Service = Svc
type Error = <S as TryStream>::Error
pub fn poll_discover(
self: Pin<&mut ServiceStream<S>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<ServiceStream<S> as Discover>::Key, <ServiceStream<S> as Discover>::Service>, <ServiceStream<S> as Discover>::Error>>
[src]
self: Pin<&mut ServiceStream<S>>,
cx: &mut Context<'_>
) -> Poll<Result<Change<<ServiceStream<S> as Discover>::Key, <ServiceStream<S> as Discover>::Service>, <ServiceStream<S> as Discover>::Error>>
impl<T, U> Discover for ServiceList<T> where
T: IntoIterator<Item = U>,
[src]
T: IntoIterator<Item = U>,
type Key = usize
type Service = U
type Error = Never
pub fn poll_discover(
self: Pin<&mut ServiceList<T>>,
&mut Context<'_>
) -> Poll<Result<Change<<ServiceList<T> as Discover>::Key, <ServiceList<T> as Discover>::Service>, <ServiceList<T> as Discover>::Error>>
[src]
self: Pin<&mut ServiceList<T>>,
&mut Context<'_>
) -> Poll<Result<Change<<ServiceList<T> as Discover>::Key, <ServiceList<T> as Discover>::Service>, <ServiceList<T> as Discover>::Error>>