pub struct TokenBucket {
pub sem: Arc<Semaphore>,
pub cancel_token: CancellationToken,
}
Fields§
§sem: Arc<Semaphore>
§cancel_token: CancellationToken
Implementations§
Trait Implementations§
Source§impl Clone for TokenBucket
impl Clone for TokenBucket
Source§fn clone(&self) -> TokenBucket
fn clone(&self) -> TokenBucket
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TokenBucket
impl Debug for TokenBucket
Auto Trait Implementations§
impl Freeze for TokenBucket
impl RefUnwindSafe for TokenBucket
impl Send for TokenBucket
impl Sync for TokenBucket
impl Unpin for TokenBucket
impl UnwindSafe for TokenBucket
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