Skip to main content

Module edit_form

Module edit_form 

Source
Expand description

EditForm: a Form built together with what setting each of its fields does — for an operation with many fields, whose events are then answered by the setter of the field they set (see EditForm::set) rather than by matching their keys. Every setter gets the whole Edit: a field may set the step’s arguments or its session.

An operation only ever hands out the form (EditForm::into_form); the setters stay its own, built again for each event. A setter may capture what the form was built from — the part as the step sees it — for what setting a field implies for others: another sketch picked brings its own axis, a selection picks the construction it fits.

Structs§

Edit
What a setter edits: the step’s arguments, its session, and the keys of the visuals selected.
EditForm
A Form and what setting each of its fields does, for the arguments A and the session T.
FormState
What a step edited through an EditForm keeps while it is edited, as its editing state (crate::editable::Editable::EditingState): its session T, and the keys of the visuals selected.

Functions§

choices
A select field’s table of options, each (option, value, label): the value it gives chosen, and the choices it offers.
chosen
The option of a select field’s table options (see choices) that has the value value.