pub trait CloudRangeStore: Send + Sync {
// Required methods
fn get_ranges(
&self,
provider: &str,
) -> Result<Option<ParsedRanges>, StoreError>;
fn set_ranges(
&self,
provider: &str,
entries: &[(String, Option<String>)],
ttl: Option<u64>,
) -> Result<(), StoreError>;
}Expand description
The store seam behind the cache layers (the reference
CloudIpStoreProtocol; the Redis shape is the section 08
cloud_ip_v2 / cloud_ranges_v2 payload, the in-memory shape is a
map).
Required Methods§
Sourcefn get_ranges(&self, provider: &str) -> Result<Option<ParsedRanges>, StoreError>
fn get_ranges(&self, provider: &str) -> Result<Option<ParsedRanges>, StoreError>
The cached entries for provider: Ok(None) is a cache miss
(“unknown, refresh eligible”), Ok(Some(..)) a hit (“known”) -
the miss/empty distinction is normative.
§Errors
StoreError on a backend failure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".