Struct PeakEwmaDiscover

struct PeakEwmaDiscover<D, C = super::completion::CompleteOnResponse> { ... }

Wraps a D-typed stream of discovered services with PeakEwma.

Implementations

impl<D, C> PeakEwmaDiscover<D, C>

fn new<Request>(discover: D, default_rtt: Duration, decay: Duration, completion: C) -> Self
where
    D: Discover,
    <D as >::Service: Service<Request>,
    C: TrackCompletion<Handle, <<D as >::Service as Service<Request>>::Response>

Wraps a D-typed Discover so that services have a PeakEwma load metric.

The provided default_rtt is used as the default RTT estimate for newly added services.

They decay value determines over what time period a RTT estimate should decay.

impl<'__pin, D, C> Unpin for PeakEwmaDiscover<D, C>

impl<D, C> Freeze for PeakEwmaDiscover<D, C>

impl<D, C> RefUnwindSafe for PeakEwmaDiscover<D, C>

impl<D, C> Send for PeakEwmaDiscover<D, C>

impl<D, C> Stream for PeakEwmaDiscover<D, C>

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<<Self as >::Item>>

impl<D, C> Sync for PeakEwmaDiscover<D, C>

impl<D, C> UnwindSafe for PeakEwmaDiscover<D, C>

impl<D: $crate::fmt::Debug, C: $crate::fmt::Debug> Debug for PeakEwmaDiscover<D, C>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl<K, S, E, D> Discover for PeakEwmaDiscover<D, C>

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 PeakEwmaDiscover<D, C>

impl<S, T, E> TryStream for PeakEwmaDiscover<D, C>

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 PeakEwmaDiscover<D, C>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for PeakEwmaDiscover<D, C>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for PeakEwmaDiscover<D, C>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for PeakEwmaDiscover<D, C>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for PeakEwmaDiscover<D, C>

impl<T> StreamExt for PeakEwmaDiscover<D, C>

impl<T> WithSubscriber for PeakEwmaDiscover<D, C>

impl<T, U> Into for PeakEwmaDiscover<D, C>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for PeakEwmaDiscover<D, C>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for PeakEwmaDiscover<D, C>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>