pub struct Ask { /* private fields */ }Expand description
A query step: asks a read model; the answer picks the path.
Ask::data([("order_id", "case.order_id")]).path(true, "approved").path(false, "paid").
Implementations§
Source§impl Ask
impl Ask
Sourcepub fn data<K: AsRef<str>, V: Into<Source>>(
fields: impl IntoIterator<Item = (K, V)>,
) -> Ask
pub fn data<K: AsRef<str>, V: Into<Source>>( fields: impl IntoIterator<Item = (K, V)>, ) -> Ask
A query with data: field → reference (case.<field>) or value.
Sourcepub fn answer(self, field: &str) -> Ask
pub fn answer(self, field: &str) -> Ask
The field of an object answer the paths match (status); default: the answer itself (a
boolean, string or number).
Sourcepub fn into_field(self, field: &str) -> Ask
pub fn into_field(self, field: &str) -> Ask
Keeps the answer in this field of the case’s data.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Ask
impl Freeze for Askwhere
*const u8 is !null: Freeze,
PhantomData<(String, Source)>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(Value, String)>: Freeze,
impl Move for Ask
impl RefUnwindSafe for Ask
impl Send for Ask
impl Sync for Ask
impl Unpin for Ask
impl UnsafeUnpin for Askwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Source)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(Value, String)>: UnsafeUnpin,
impl UnwindSafe for Ask
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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