pub struct QuerySchema { /* private fields */ }Expand description
What a query type is about. Made with Domain::query:
shop_domain.query("GetOrder").target("order", "id"); (a GetOrder with {"id": "o-17"}
is about order o-17). Clients that ask these queries by name need the domain:
kernable.with_domain(&shop_domain).
Implementations§
Source§impl QuerySchema
impl QuerySchema
Sourcepub fn target(self, aggregate_type: &str, field: &str) -> Self
pub fn target(self, aggregate_type: &str, field: &str) -> Self
The query is about one aggregate of aggregate_type (order, of the query’s domain, or
qualified: shop.order), whose ID is in the data’s field field (as on the wire:
orderId). The SDK sends it with the query, signed, and a middleware decides on it as
on a command’s aggregate (crate::Check::target). Data without a non-empty string in
field sends no target.
Auto Trait Implementations§
impl Forget for QuerySchema
impl Freeze for QuerySchemawhere
*const ArcInner<DomainInner> is !null: Freeze,
PhantomData<ArcInner<DomainInner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for QuerySchema
impl RefUnwindSafe for QuerySchemawhere
Atomic<usize>: RefUnwindSafe,
RwLock<HashMap<String, EventDef>>: RefUnwindSafe,
RwLock<HashMap<String, VaultFields>>: RefUnwindSafe,
RwLock<HashMap<String, Option<QueryTarget>>>: RefUnwindSafe,
RwLock<Vec<Arc<dyn Runnable>>>: RefUnwindSafe,
RwLock<Vec<Listener>>: RefUnwindSafe,
RwLock<Vec<Process>>: RefUnwindSafe,
RwLock<HashSet<String>>: RefUnwindSafe,
impl Send for QuerySchema
impl Sync for QuerySchema
impl Unpin for QuerySchema
impl UnsafeUnpin for QuerySchemawhere
*const ArcInner<DomainInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<DomainInner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for QuerySchema
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request