pub enum RateLimitResponseStrategy {
TooManyRequests,
ServiceUnavailable,
Custom(u16),
}Expand description
限流响应策略
定义被限流时的响应行为。
Variants§
Implementations§
Source§impl RateLimitResponseStrategy
impl RateLimitResponseStrategy
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
获取对应的 HTTP 状态码
Trait Implementations§
Source§impl Clone for RateLimitResponseStrategy
impl Clone for RateLimitResponseStrategy
Source§fn clone(&self) -> RateLimitResponseStrategy
fn clone(&self) -> RateLimitResponseStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RateLimitResponseStrategy
impl RefUnwindSafe for RateLimitResponseStrategy
impl Send for RateLimitResponseStrategy
impl Sync for RateLimitResponseStrategy
impl Unpin for RateLimitResponseStrategy
impl UnsafeUnpin for RateLimitResponseStrategy
impl UnwindSafe for RateLimitResponseStrategy
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