async_graphql::extensions::apollo_persisted_queries

Trait CacheStorage

Source
pub trait CacheStorage:
    Send
    + Sync
    + Clone
    + 'static {
    // Required methods
    fn get<'life0, 'async_trait>(
        &'life0 self,
        key: String,
    ) -> Pin<Box<dyn Future<Output = Option<ExecutableDocument>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set<'life0, 'async_trait>(
        &'life0 self,
        key: String,
        query: ExecutableDocument,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Cache storage for persisted queries.

Required Methods§

Source

fn get<'life0, 'async_trait>( &'life0 self, key: String, ) -> Pin<Box<dyn Future<Output = Option<ExecutableDocument>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Load the query by key.

Source

fn set<'life0, 'async_trait>( &'life0 self, key: String, query: ExecutableDocument, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Save the query by key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§