[−][src]Struct slottle::ThrottlePoolBuilder
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]
&mut self,
fuzzy_fn: Option<fn(_: Duration) -> Duration>
) -> &mut Self
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
Auto Trait Implementations
impl<K> RefUnwindSafe for ThrottlePoolBuilder<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
impl<K> Send for ThrottlePoolBuilder<K> where
K: Send,
K: Send,
impl<K> Sync for ThrottlePoolBuilder<K> where
K: Sync,
K: Sync,
impl<K> Unpin for ThrottlePoolBuilder<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for ThrottlePoolBuilder<K> where
K: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,