pub trait Submit<R: Resource>: Sized {
// Required methods
fn action_id(&self) -> &'static str;
fn into_invoke(self) -> Result<Invoke<R>, String>;
// Provided method
fn control_binding(self, actions: &Actions<R>) -> Option<ActionBinding<()>> { ... }
}Expand description
Something a dispatcher submits and a button is bound to: a field edit
made at a path (p.favorite.set(true)), a verb with its arguments, or an
invocation built some other way. No app writes an action id or an
argument map.
Required Methods§
Provided Methods§
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.