pub struct QueryDefinition<A, C, R, T = Vec<R>> {
pub name: &'static str,
/* private fields */
}Expand description
A named query (defineQuery): A is its arguments, C the client’s
context, and Query<R, T> what it builds. Make one with
define_query.
The name must match the TS registry entry the server runs: the client builds the query here for optimistic results, and the server builds its own from the name and arguments.
Fields§
§name: &'static strIts name in the TS query registry.
Implementations§
Source§impl<A, C, R, T> QueryDefinition<A, C, R, T>
impl<A, C, R, T> QueryDefinition<A, C, R, T>
Sourcepub fn with(&self, args: A) -> QueryRequest<C, R, T>
pub fn with(&self, args: A) -> QueryRequest<C, R, T>
The query with args, ready to materialize, run, or preload.
Trait Implementations§
Source§impl<A, C, R, T> Clone for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Clone for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Copy for QueryDefinition<A, C, R, T>
Source§impl<A, C, R, T> NamedQuery<C> for QueryDefinition<A, C, R, T>
impl<A, C, R, T> NamedQuery<C> for QueryDefinition<A, C, R, T>
Auto Trait Implementations§
impl<A, C, R, T> Forget for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Freeze for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Move for QueryDefinition<A, C, R, T>
impl<A, C, R, T> RefUnwindSafe for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Send for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Sync for QueryDefinition<A, C, R, T>
impl<A, C, R, T> Unpin for QueryDefinition<A, C, R, T>
impl<A, C, R, T> UnsafeUnpin for QueryDefinition<A, C, R, T>
impl<A, C, R, T> UnwindSafe for QueryDefinition<A, C, R, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more