pub enum RateLimiterOutcome<T> {
Admitted {
remaining: u64,
},
Rejected {
cost: TokenCount,
value: T,
reason: RateLimitRejection,
},
}Expand description
Factual result of one admission request.
Variants§
Admitted
Value was admitted and delivered.
Rejected
Value was not admitted; ownership is returned.
Fields
§
cost: TokenCountExact requested token cost.
§
value: TUnaccepted value.
§
reason: RateLimitRejectionRejection reason.
Trait Implementations§
Source§impl<T: Debug> Debug for RateLimiterOutcome<T>
impl<T: Debug> Debug for RateLimiterOutcome<T>
Source§impl<T: PartialEq> PartialEq for RateLimiterOutcome<T>
impl<T: PartialEq> PartialEq for RateLimiterOutcome<T>
impl<T: Eq> Eq for RateLimiterOutcome<T>
impl<T> StructuralPartialEq for RateLimiterOutcome<T>
Auto Trait Implementations§
impl<T> Freeze for RateLimiterOutcome<T>where
T: Freeze,
impl<T> RefUnwindSafe for RateLimiterOutcome<T>where
T: RefUnwindSafe,
impl<T> Send for RateLimiterOutcome<T>where
T: Send,
impl<T> Sync for RateLimiterOutcome<T>where
T: Sync,
impl<T> Unpin for RateLimiterOutcome<T>where
T: Unpin,
impl<T> UnsafeUnpin for RateLimiterOutcome<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RateLimiterOutcome<T>where
T: UnwindSafe,
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