pub struct LimiterBuilder<K: Key> { /* private fields */ }Implementations§
Source§impl LimiterBuilder<String>
impl LimiterBuilder<String>
pub fn new<K: Key>(concurrent_tasks: usize) -> LimiterBuilder<K>
Source§impl<K: Key> LimiterBuilder<K>
impl<K: Key> LimiterBuilder<K>
pub fn with_concurrent_tasks(self, concurrent_tasks: usize) -> Self
pub fn with_default_block_until(self, instant: Option<Instant>) -> Self
pub fn with_default_block_until_at_least(self, instant: Instant) -> Self
pub fn with_block_by_key_until(self, instant: Option<Instant>, key: K) -> Self
pub fn with_block_by_key_until_at_least(self, instant: Instant, key: K) -> Self
pub fn with_default_interval(self, period: Option<Duration>) -> Self
pub fn with_default_interval_at_least(self, period: Duration) -> Self
pub fn with_interval_by_key(self, period: Option<Duration>, key: K) -> Self
pub fn with_interval_by_key_at_least(self, period: Duration, key: K) -> Self
pub fn build<P: Priority, T: TaskResult>(self) -> Limiter<K, P, T>
Trait Implementations§
Auto Trait Implementations§
impl<K> !Freeze for LimiterBuilder<K>
impl<K> !RefUnwindSafe for LimiterBuilder<K>
impl<K> Send for LimiterBuilder<K>
impl<K> Sync for LimiterBuilder<K>
impl<K> Unpin for LimiterBuilder<K>where
K: Unpin,
impl<K> !UnwindSafe for LimiterBuilder<K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more