Skip to main content

QueryType

Trait QueryType 

Source
pub trait QueryType: Message {
    type Answer: Serialize + DeserializeOwned;
}
Expand description

A query and its answer: #[query("domain", answer = Row)]. A query about one aggregate names it, and the field with its ID: #[query("shop", answer = OrderRow, target(aggregate = "order", field = order_id))]. The SDK sends that aggregate with the query, and a middleware decides on it as on a command’s aggregate (crate::Check::target): “only the order’s owner may read it”. The aggregate type is of the query’s domain, or qualified: shop.order.

Required Associated Types§

Source

type Answer: Serialize + DeserializeOwned

What the read model answers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§