pub struct Permit(/* private fields */);Expand description
Permit to send a Discord HTTP API request to the acquired endpoint.
Implementations§
Source§impl Permit
impl Permit
Sourcepub fn complete(self, headers: Option<RateLimitHeaders>)
pub fn complete(self, headers: Option<RateLimitHeaders>)
Update the RateLimiter based on the response headers.
Non-completed permits are regarded as cancelled, so only call this on receiving a response.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Permit
impl !UnwindSafe for Permit
impl Forget for Permit
impl Freeze for Permitwhere
*const ArcInner<Inner<Option<RateLimitHeaders>>> is !null: Freeze,
PhantomData<ArcInner<Inner<Option<RateLimitHeaders>>>>: Freeze,
impl Move for Permit
impl Send for Permit
impl Sync for Permit
impl Unpin for Permit
impl UnsafeUnpin for Permitwhere
*const ArcInner<Inner<Option<RateLimitHeaders>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner<Option<RateLimitHeaders>>>>: UnsafeUnpin,
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