Skip to main content

field_html_placed

Function field_html_placed 

Source
pub fn field_html_placed(
    field: &Field<'_>,
    filling: &Filling<'_>,
    opts: &Emit,
    out: &mut String,
    placed: &mut Vec<Range<usize>>,
)
Expand description

One field, saying where each of its options landed.

Byte-identical to field_html_into, and it appends one entry to placed per option, in order: the offsets in out between which that option was written. A select’s option is its <option>; a radio group’s or a checklist’s is its <label>, which holds the input. Nothing is appended for a field that offers no options.

Same reason as crate::list::cells_html_placed: a caller compiling a described screen into a template has to know which bytes one option produced, and two options with the same label are the same bytes.