Struct Invoke
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§
§impl<R> Invoke<R>
impl<R> Invoke<R>
pub fn effect<E>(effect: &E) -> Invoke<R>where
E: Effect,
pub fn effect<E>(effect: &E) -> Invoke<R>where
E: Effect,
An invocation of one of the app’s effects — show an item, refresh a
list — through the same door 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.
pub 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.
pub 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.
§impl<R> Invoke<R>where
R: Resource,
impl<R> Invoke<R>where
R: Resource,
pub fn group(members: impl IntoIterator<Item = Invoke<R>>) -> Invoke<R>
pub fn group(members: impl IntoIterator<Item = Invoke<R>>) -> Invoke<R>
Several invocations applied as one action: one change, one version, one undo step. Members that are groups themselves are flattened.
Trait Implementations§
Source§impl<R: Resource> Submit<R> for Invoke<R>
impl<R: Resource> Submit<R> for Invoke<R>
Source§fn into_invoke(self) -> Result<Invoke<R>, String>
fn into_invoke(self) -> Result<Invoke<R>, String>
The invocation of the host door this submits. Read more
Source§fn control_binding(self, actions: &Actions<R>) -> Option<ActionBinding<()>>
fn control_binding(self, actions: &Actions<R>) -> Option<ActionBinding<()>>
The binding of a button that submits this when pressed, or
None
(and a failure in tests) when the resource does not publish it.Auto Trait Implementations§
impl<R> Freeze 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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