pub trait RedisAdminStore: Send + Sync {
// Required methods
fn scan_match(&self, pattern: &str) -> Result<Vec<String>, StoreError>;
fn pttl_ms(&self, key: &str) -> Result<i64, StoreError>;
fn set_px(
&self,
key: &str,
value: &str,
ttl_ms: i64,
) -> Result<(), StoreError>;
fn delete_keys(&self, keys: &[String]) -> Result<(), StoreError>;
fn get_key(
&self,
prefix: &str,
namespace: &str,
key: &str,
) -> Result<Option<String>, StoreError>;
}Expand description
The admin surface the legacy ban-key migration needs (the reference
RedisAdmin, the sync seam pattern of crate::distributed).
Required Methods§
Sourcefn scan_match(&self, pattern: &str) -> Result<Vec<String>, StoreError>
fn scan_match(&self, pattern: &str) -> Result<Vec<String>, StoreError>
Sourcefn pttl_ms(&self, key: &str) -> Result<i64, StoreError>
fn pttl_ms(&self, key: &str) -> Result<i64, StoreError>
PTTL key in milliseconds: -1 persistent, -2 missing (the
Redis semantics; the seconds/milliseconds distinction is
normative).
§Errors
StoreError on a backend failure.
Sourcefn set_px(&self, key: &str, value: &str, ttl_ms: i64) -> Result<(), StoreError>
fn set_px(&self, key: &str, value: &str, ttl_ms: i64) -> Result<(), StoreError>
SET key value PX ttl_ms: value and millisecond TTL land in one
command (the migration’s write shape).
§Errors
StoreError on a backend failure.
Sourcefn delete_keys(&self, keys: &[String]) -> Result<(), StoreError>
fn delete_keys(&self, keys: &[String]) -> Result<(), StoreError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".