pub trait Store:
Send
+ Sync
+ 'static {
// Required methods
fn writer(&self, key: &StorageKey) -> Pending<'_, Box<dyn Writer>>;
fn reader(&self, key: &StorageKey) -> Pending<'_, Option<Box<dyn Reader>>>;
fn delete(&self, key: &StorageKey) -> Pending<'_, ()>;
fn exists(&self, key: &StorageKey) -> Pending<'_, bool>;
fn download_url(&self, link: &DownloadLink<'_>) -> Result<String>;
// Provided method
fn served(&self, _path_and_query: &str, _now: Timestamp) -> Option<Served> { ... }
}Required Methods§
fn writer(&self, key: &StorageKey) -> Pending<'_, Box<dyn Writer>>
fn reader(&self, key: &StorageKey) -> Pending<'_, Option<Box<dyn Reader>>>
Sourcefn delete(&self, key: &StorageKey) -> Pending<'_, ()>
fn delete(&self, key: &StorageKey) -> Pending<'_, ()>
Deleting a key that holds nothing succeeds.
fn exists(&self, key: &StorageKey) -> Pending<'_, bool>
fn download_url(&self, link: &DownloadLink<'_>) -> Result<String>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".