Struct artemis_normalized_cache::QueryStore [−][src]
A reference to the store used to run custom query updates
Implementations
impl QueryStore[src]
pub fn update_query<'a, Q: GraphQLQuery, F>(
&'a self,
_query: Q,
variables: Q::Variables,
updater_fn: F,
dependencies: &mut HashSet<String>
) where
F: FnOnce(Option<Q::ResponseData>) -> Option<Q::ResponseData> + 'a, [src]
&'a self,
_query: Q,
variables: Q::Variables,
updater_fn: F,
dependencies: &mut HashSet<String>
) where
F: FnOnce(Option<Q::ResponseData>) -> Option<Q::ResponseData> + 'a,
Run a custom update function against the cache.
Parameters
_query- TheGraphQLQueryobject for the query you want to update.variables- TheVariablesfor the query you want to update. It will only update cached results for that set of variables.updater_fn- The custom updater function. This takes in anOption<ResponseData>that represents the current state and should return anOption<ResponseData>that represents the new state.Nonemeans deleting the entry in this context. The current state is cloned, so feel free to modify and return it.dependencies- This is passed into the update closure and should simply be passed through.
Trait Implementations
impl Clone for QueryStore[src]
fn clone(&self) -> QueryStore[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl From<Arc<Store>> for QueryStore[src]
Auto Trait Implementations
impl !RefUnwindSafe for QueryStore
impl Send for QueryStore
impl Sync for QueryStore
impl Unpin for QueryStore
impl !UnwindSafe for QueryStore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,