pub enum RedisStoreError {
WindowTooShort,
WindowTooLarge,
CommandFailed(String),
InvalidUsage(i64),
InvalidResetAfter(i64),
}Expand description
Errors returned by the Redis rate-limit store.
Variants§
WindowTooShort
The fixed window cannot be represented in Redis milliseconds.
WindowTooLarge
The fixed window exceeds Redis’s signed 64-bit millisecond range.
CommandFailed(String)
Redis rejected or could not execute the atomic increment operation.
InvalidUsage(i64)
The atomic increment returned a non-positive usage count.
InvalidResetAfter(i64)
The atomic increment returned a non-positive reset duration.
Trait Implementations§
Source§impl Clone for RedisStoreError
impl Clone for RedisStoreError
Source§fn clone(&self) -> RedisStoreError
fn clone(&self) -> RedisStoreError
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 moreSource§impl Debug for RedisStoreError
impl Debug for RedisStoreError
Source§impl Display for RedisStoreError
impl Display for RedisStoreError
impl Eq for RedisStoreError
Source§impl Error for RedisStoreError
impl Error for RedisStoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<RedisError> for RedisStoreError
impl From<RedisError> for RedisStoreError
Source§fn from(error: RedisError) -> Self
fn from(error: RedisError) -> Self
Converts to this type from the input type.
Source§impl From<RedisStoreError> for RateLimitError
Convert the RedisStoreError to a RateLimitError.
impl From<RedisStoreError> for RateLimitError
Convert the RedisStoreError to a RateLimitError.
Source§fn from(error: RedisStoreError) -> Self
fn from(error: RedisStoreError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RedisStoreError
impl PartialEq for RedisStoreError
impl StructuralPartialEq for RedisStoreError
Auto Trait Implementations§
impl Freeze for RedisStoreError
impl RefUnwindSafe for RedisStoreError
impl Send for RedisStoreError
impl Sync for RedisStoreError
impl Unpin for RedisStoreError
impl UnsafeUnpin for RedisStoreError
impl UnwindSafe for RedisStoreError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.