PoolConfig

Struct PoolConfig 

Source
pub struct PoolConfig<C, A, X, Q, E, M> { /* private fields */ }
Expand description

A fully configured pool but you might override some defaults

Implementations§

Source§

impl<C, A, X, Q, E, M> PoolConfig<C, A, X, Q, E, M>

Source

pub fn spawn_on( self, h: &Handle, ) -> <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Pool
where A: Stream<Item = Address, Error = Void>, C: Connect + 'static, <<C as Connect>::Future as Future>::Item: Sink, M: NewMetrics, M::Collect: 'static, X: NewMux<A, C, E::ErrorLog, M::Collect>, <X as NewMux<A, C, E::ErrorLog, M::Collect>>::Sink: 'static, E: NewErrorLog<<<C as Connect>::Future as Future>::Error, <<<C as Connect>::Future as Future>::Item as Sink>::SinkError>, E::ErrorLog: Clone + 'static, Q: NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect, Pool = <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Pool>,

Spawn a connection pool on the main loop specified by handle

Source

pub fn lazy_uniform_connections( self, num: u32, ) -> PoolConfig<C, A, LazyUniform, Q, E, M>

Configure a uniform connection pool with specified number of per-host connections crated lazily (i.e. when there are requests)

Source

pub fn with_queue_size(self, num: usize) -> PoolConfig<C, A, X, Queue, E, M>

Add a queue of size num used when no connection can accept a message

Source

pub fn metrics<NM>(self, metrics: NM) -> PoolConfig<C, A, X, Q, E, NM>
where NM: NewMetrics,

Override metrics reporter

Source

pub fn errors<NE>(self, errors: NE) -> PoolConfig<C, A, X, Q, NE, M>
where NE: ErrorLog,

Override error reporter

Auto Trait Implementations§

§

impl<C, A, X, Q, E, M> Freeze for PoolConfig<C, A, X, Q, E, M>
where C: Freeze, A: Freeze, X: Freeze, Q: Freeze, E: Freeze, M: Freeze,

§

impl<C, A, X, Q, E, M> RefUnwindSafe for PoolConfig<C, A, X, Q, E, M>

§

impl<C, A, X, Q, E, M> Send for PoolConfig<C, A, X, Q, E, M>
where C: Send, A: Send, X: Send, Q: Send, E: Send, M: Send,

§

impl<C, A, X, Q, E, M> Sync for PoolConfig<C, A, X, Q, E, M>
where C: Sync, A: Sync, X: Sync, Q: Sync, E: Sync, M: Sync,

§

impl<C, A, X, Q, E, M> Unpin for PoolConfig<C, A, X, Q, E, M>
where C: Unpin, A: Unpin, X: Unpin, Q: Unpin, E: Unpin, M: Unpin,

§

impl<C, A, X, Q, E, M> UnwindSafe for PoolConfig<C, A, X, Q, E, M>

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.