pub trait RedisClient:
Send
+ Sync
+ Debug {
// Required method
fn incr_with_ttl(
&self,
key: &str,
ttl_secs: u64,
) -> Result<u64, ServerError>;
}Available on crate feature
distributed-rate-limit only.Expand description
Required Methods§
Sourcefn incr_with_ttl(&self, key: &str, ttl_secs: u64) -> Result<u64, ServerError>
fn incr_with_ttl(&self, key: &str, ttl_secs: u64) -> Result<u64, ServerError>
Increments key, sets TTL as needed, and returns current count.