pub struct Submits<I> { /* private fields */ }Expand description
The buttons of an action’s input dialog and input page beside the action’s own, each running the same action with one checkbox of the input checked.
Action::submits and
HeaderAction::submits add them, each over a bool field of
the input picked off its Keys:
#[derive(FormInput)]
struct Shipping {
carrier: String,
notify: bool,
}
fn submits(submits: Submits<Shipping>) -> Submits<Shipping> {
submits.add("Ship and notify", |f| f.notify)
}The dialog renders no control for a checkbox a submit picks: the action’s own button posts it
unchecked, false, and the submit posts it checked, true, so run
reads which button ran it off the input. The buttons follow the action’s own in the order they
are added, so Enter in a field still runs the action’s own. The POST goes through the action’s
route, its policy, can_run and input checks, whichever button sent it.
Mounting refuses a submit picking a field that does not render a checkbox.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Submits<I>
impl<I> RefUnwindSafe for Submits<I>
impl<I> Send for Submits<I>
impl<I> Sync for Submits<I>
impl<I> Unpin for Submits<I>
impl<I> UnsafeUnpin for Submits<I>
impl<I> UnwindSafe for Submits<I>
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