Skip to main content

PoolDiscoverer

Struct PoolDiscoverer 

Source
pub struct PoolDiscoverer<MS, Target, Request>
where MS: MakeService<Target, Request>,
{ /* private fields */ }
Expand description

A wrapper around MakeService that discovers a new service when load is high, and removes a service when load is low. See Pool.

Trait Implementations§

Source§

impl<MS, Target, Request> Debug for PoolDiscoverer<MS, Target, Request>
where MS: MakeService<Target, Request> + Debug, Target: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<MS, Target, Request> Discover for PoolDiscoverer<MS, Target, Request>
where MS: MakeService<Target, Request>, MS::MakeError: Into<Box<dyn Error + Send + Sync>>, MS::Error: Into<Box<dyn Error + Send + Sync>>, Target: Clone,

Source§

type Key = usize

NewService key
Source§

type Service = DropNotifyService<<MS as MakeService<Target, Request>>::Service>

The type of Service yielded by this Discover.
Source§

type Error = <MS as MakeService<Target, Request>>::MakeError

Error produced during discovery
Source§

fn poll_discover( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<Change<Self::Key, Self::Service>, Self::Error>>

Yields the next discovery change set.
Source§

impl<'pin, MS, Target, Request> Unpin for PoolDiscoverer<MS, Target, Request>
where MS: MakeService<Target, Request>, __PoolDiscoverer<'pin, MS, Target, Request>: Unpin,

Auto Trait Implementations§

§

impl<MS, Target, Request> Freeze for PoolDiscoverer<MS, Target, Request>
where MS: Freeze, Target: Freeze, <MS as MakeService<Target, Request>>::Future: Freeze,

§

impl<MS, Target, Request> !RefUnwindSafe for PoolDiscoverer<MS, Target, Request>

§

impl<MS, Target, Request> Send for PoolDiscoverer<MS, Target, Request>
where MS: Send, Target: Send, <MS as MakeService<Target, Request>>::Future: Send,

§

impl<MS, Target, Request> Sync for PoolDiscoverer<MS, Target, Request>
where MS: Sync, Target: Sync, <MS as MakeService<Target, Request>>::Future: Sync,

§

impl<MS, Target, Request> UnsafeUnpin for PoolDiscoverer<MS, Target, Request>
where MS: UnsafeUnpin, Target: UnsafeUnpin, <MS as MakeService<Target, Request>>::Future: UnsafeUnpin,

§

impl<MS, Target, Request> !UnwindSafe for PoolDiscoverer<MS, Target, Request>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V