pub struct SubmitForm<M: Model, A: Action> { /* private fields */ }Expand description
Form with a submit action attached.
Implementations§
Source§impl<M: Model, A: Action> SubmitForm<M, A>
impl<M: Model, A: Action> SubmitForm<M, A>
Trait Implementations§
Source§impl<M: Model, A> Component for SubmitForm<M, A>
impl<M: Model, A> Component for SubmitForm<M, A>
fn render(&self, out: &mut String, r: &Render<'_>)
fn form(&self) -> Option<&dyn FormSource>
Source§fn reveal(&self, field: &str) -> Option<Revealed>
fn reveal(&self, field: &str) -> Option<Revealed>
The raw value of a masked field this component shows, for an audited reveal. The server
checks the unmask permission before sending it.
Source§fn source(&self, key: &str) -> Option<&dyn DataSource>
fn source(&self, key: &str) -> Option<&dyn DataSource>
Data the component fetches through an action, by key (a field name for lookups).
fn grid(&self) -> Option<&dyn GridSource>
Source§fn import(&self) -> Option<&dyn ImportSource>
fn import(&self) -> Option<&dyn ImportSource>
CSV import, for components that import rows (see
crate::Import).Source§fn children(&self) -> &[Node]
fn children(&self) -> &[Node]
Nodes held by a container. Child
i of the node at path p has the path p.i.Source§fn eager_children(&self) -> &[Node]
fn eager_children(&self) -> &[Node]
Children rendered with the page. Others, such as closed lazy tabs, load when first shown.
Source§impl<M: Model, A> DataSource for SubmitForm<M, A>
Checks one step of a stepped form: reads every submitted value the way a save would and
returns the errors of the step’s fields only. Nothing is saved; the submit action’s
permission is required, as for saving.
impl<M: Model, A> DataSource for SubmitForm<M, A>
Checks one step of a stepped form: reads every submitted value the way a save would and returns the errors of the step’s fields only. Nothing is saved; the submit action’s permission is required, as for saving.
Source§impl<M: Model, A> FormSource for SubmitForm<M, A>
impl<M: Model, A> FormSource for SubmitForm<M, A>
fn action(&self) -> ActionMeta
Source§fn submit(
&self,
ctx: Ctx,
values: Map<String, Json>,
) -> BoxFuture<Result<Vec<Effect>>>
fn submit( &self, ctx: Ctx, values: Map<String, Json>, ) -> BoxFuture<Result<Vec<Effect>>>
Parses submitted values, validates and runs the action.
values holds what the user typed.Source§fn tool_schema(&self) -> Json
fn tool_schema(&self) -> Json
JSON Schema of the values, for agent tools.
Auto Trait Implementations§
impl<M, A> !RefUnwindSafe for SubmitForm<M, A>
impl<M, A> !UnwindSafe for SubmitForm<M, A>
impl<M, A> Freeze for SubmitForm<M, A>
impl<M, A> Send for SubmitForm<M, A>
impl<M, A> Sync for SubmitForm<M, A>
impl<M, A> Unpin for SubmitForm<M, A>
impl<M, A> UnsafeUnpin for SubmitForm<M, A>where
Form<M>: UnsafeUnpin,
Option<Arc<dyn Fn(&<A as Action>::Output, &mut UiCtx) + Sync + Send>>: UnsafeUnpin,
PhantomData<fn() -> A>: UnsafeUnpin,
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