Struct ServiceList
pub struct ServiceList<T>
where
T: IntoIterator, { /* private fields */ }
Static service discovery based on a predetermined list of services.
ServiceList is created with an initial list of services. The discovery
process will yield this list once and do nothing after.
Implementations
impl<T, U> ServiceList<T>
where
T: IntoIterator<Item = U>,
fn new<Request>(services: T) -> ServiceList<T> where U: Service<Request>,
Trait Implementations
impl<'__pin, T> Unpin for ServiceList<T>
where
PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,
T: IntoIterator,
impl<T> Debug for ServiceList<T>
where
T: IntoIterator + Debug,
T::IntoIter: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T, U> Stream for ServiceList<T>
where
T: IntoIterator<Item = U>,
type Item = Result<Change<usize, U>, never>;fn poll_next(self: Pin<&mut Self>, &mut Context<'_>) -> Poll<Option<Self::Item>>
Auto Trait Implementations
impl<T> Freeze for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: Freeze,
impl<T> RefUnwindSafe for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: RefUnwindSafe,
impl<T> Send for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: Send,
impl<T> Sync for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: Sync,
impl<T> UnsafeUnpin for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: UnsafeUnpin,
impl<T> UnwindSafe for ServiceList<T>
where
Enumerate<<T as IntoIterator>::IntoIter>: UnwindSafe,
Blanket Implementations
impl<K, S, E, D> Discover for ServiceList<T>
where
D: TryStream<Ok = Change<K, S>, Error = E> + ?Sized,
K: Eq,
type Key = K;type Service = S;type Error = E;fn poll_discover(self: Pin<&mut D>, cx: &mut Context<'_>) -> Poll<Option<Result<<D as TryStream>::Ok, <D as TryStream>::Error>>>
impl<S> TryStreamExt for ServiceList<T>
where
S: TryStream + ?Sized,
impl<S, T, E> TryStream for ServiceList<T>
where
S: Stream<Item = Result<T, E>> + ?Sized,
type Ok = T;type Error = E;fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>
impl<T> Any for ServiceList<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ServiceList<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ServiceList<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for ServiceList<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ServiceList<T>
impl<T> StreamExt for ServiceList<T>
where
T: Stream + ?Sized,
impl<T> WithSubscriber for ServiceList<T>
impl<T, U> Into<U> for ServiceList<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for ServiceList<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ServiceList<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>