pub trait QueryCache:
Send
+ Sync
+ Debug {
// Required methods
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
package_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
package_name: &'life1 str,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
package_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Persistent storage for serialized registry query responses.
Required Methods§
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
package_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
package_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the serialized cache entry for a package name.