pub struct Invoke<R> {
pub id: &'static str,
pub arguments: Map<String, Value>,
/* private fields */
}Expand description
One fully specified invocation of a declared action, or of one of the
app’s effects (Invoke::effect).
Fields§
§id: &'static str§arguments: Map<String, Value>Implementations§
Source§impl<R> Invoke<R>
impl<R> Invoke<R>
Sourcepub fn effect<E: Effect>(effect: &E) -> Self
pub fn effect<E: Effect>(effect: &E) -> Self
An invocation of one of the app’s effects — show an item, refresh a
list — through the same API as its actions: what a launch asks of
an app beside editing its resource (tilo-store:app/<id> showing that
app). It changes no document, so it never builds an action.
An effect offered only on rows (#[effect(row, on = Page)]) acts on
the row it is invoked on: name it with Self::on. Until then it
refuses, saying so, since the resource does not offer it.
Sourcepub fn on(self, row: impl Into<String>) -> Self
pub fn on(self, row: impl Into<String>) -> Self
This invocation on the published row row (the Browser’s page, one
download), which offers its action, rather than on the resource.
Sourcepub fn refusal(&self) -> Option<&str>
pub fn refusal(&self) -> Option<&str>
Why the input this invocation was built from does not bind: such an invocation refuses wherever it is submitted.
Sourcepub fn is_effect(&self) -> bool
pub fn is_effect(&self) -> bool
Whether this invokes an effect (Self::effect) rather than one of
the resource’s actions.
Sourcepub fn address_on(&self, resource: impl Into<String>) -> ActionAddress
pub fn address_on(&self, resource: impl Into<String>) -> ActionAddress
This invocation’s action as the published resource resource (an
item of the record, a child, a live row) offers it.
Source§impl<R: Resource> Invoke<R>
impl<R: Resource> Invoke<R>
Sourcepub fn address(&self) -> ActionAddress
pub fn address(&self) -> ActionAddress
This invocation’s action as the record’s own resource publishes it.
Sourcepub fn group(members: impl IntoIterator<Item = Self>) -> Self
pub fn group(members: impl IntoIterator<Item = Self>) -> Self
Several invocations applied as one action: one change, one version, one undo step. Members that are groups themselves are flattened.
Trait Implementations§
Auto Trait Implementations§
impl<R> Forget for Invoke<R>
impl<R> Freeze for Invoke<R>
impl<R> Move for Invoke<R>
impl<R> RefUnwindSafe for Invoke<R>
impl<R> Send for Invoke<R>
impl<R> Sync for Invoke<R>
impl<R> Unpin for Invoke<R>
impl<R> UnsafeUnpin for Invoke<R>
impl<R> UnwindSafe for Invoke<R>
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more