pub trait PersistedQueryStore:
Send
+ Sync
+ 'static {
// Required methods
fn get<'a>(&'a self, hash: &'a str) -> BoxFuture<'a, Option<Arc<str>>>;
fn put<'a>(&'a self, hash: &'a str, document: Arc<str>) -> BoxFuture<'a, ()>;
}Expand description
Where APQ registrations live.
The in-memory InMemoryPersistedQueryStore is per process; a fleet
behind a load balancer shares one by implementing this trait over Redis
or the database (a miss is harmless — the client re-sends the document —
so a best-effort store is fine).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".