[][src]Struct slottle::ThrottlePoolBuilder

pub struct ThrottlePoolBuilder<K: Hash + Eq> { /* fields omitted */ }

Use it to build a ThrottlePool.

Implementations

impl<K: Hash + Eq> ThrottlePoolBuilder<K>[src]

pub fn interval(&mut self, interval: Duration) -> &mut Self[src]

Set interval, default value is Duration::default().

pub fn concurrent(&mut self, concurrent: u32) -> &mut Self[src]

Set concurrent, default value is 1.

pub fn fuzzy_fn(
    &mut self,
    fuzzy_fn: Option<fn(_: Duration) -> Duration>
) -> &mut Self
[src]

Set fuzzy_fn to modify interval each run, default value is None.

pub fn build(&mut self) -> Option<ThrottlePool<K>>[src]

Create a ThrottlePool pool with previous configuration.

Return None if concurrent == 0 or larger than isize::MAX.

Trait Implementations

impl<K: Hash + Eq> Default for ThrottlePoolBuilder<K>[src]

Auto Trait Implementations

impl<K> RefUnwindSafe for ThrottlePoolBuilder<K> where
    K: RefUnwindSafe

impl<K> Send for ThrottlePoolBuilder<K> where
    K: Send

impl<K> Sync for ThrottlePoolBuilder<K> where
    K: Sync

impl<K> Unpin for ThrottlePoolBuilder<K> where
    K: Unpin

impl<K> UnwindSafe for ThrottlePoolBuilder<K> where
    K: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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