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
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<P> Discover for Pin<P> where
P: Unpin + DerefMut,
P::Target: Discover,
[src]
P: Unpin + DerefMut,
P::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
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>>
impl<D: ?Sized + Discover + Unpin> Discover for &mut D
[src]
type Key = D::Key
type Service = D::Service
type Error = D::Error
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>>
impl<D: ?Sized + Discover + Unpin> Discover for Box<D>
[src]
type Key = D::Key
type Service = D::Service
type Error = D::Error
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>>
Implementors
impl<S, K, Svc> Discover for ServiceStream<S> where
K: Hash + Eq,
S: TryStream<Ok = Change<K, Svc>>,
[src]
K: Hash + Eq,
S: TryStream<Ok = Change<K, Svc>>,
type Key = K
type Service = Svc
type Error = S::Error
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>>
impl<T, U> Discover for ServiceList<T> where
T: IntoIterator<Item = U>,
[src]
T: IntoIterator<Item = U>,