html/generated/
button.rs

1pub mod element {
2    /// The HTML `<button>` element
3    ///
4    /// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button)
5    #[doc(alias = "button")]
6    #[non_exhaustive]
7    #[derive(PartialEq, Clone, Default)]
8    pub struct Button {
9        sys: html_sys::forms::Button,
10        children: Vec<super::child::ButtonChild>,
11    }
12    impl Button {
13        /// Create a new builder
14        pub fn builder() -> super::builder::ButtonBuilder {
15            super::builder::ButtonBuilder::new(Default::default())
16        }
17    }
18    impl Button {
19        /// Access the element's `data-*` properties
20        pub fn data_map(&self) -> &html_sys::DataMap {
21            &self.sys.data_map
22        }
23        /// Mutably access the element's `data-*` properties
24        pub fn data_map_mut(&mut self) -> &mut html_sys::DataMap {
25            &mut self.sys.data_map
26        }
27    }
28    impl Button {
29        /// Get the value of the `disabled` attribute
30        pub fn disabled(&self) -> bool {
31            self.sys.disabled
32        }
33        /// Set the value of the `disabled` attribute
34        pub fn set_disabled(&mut self, value: bool) {
35            self.sys.disabled = value;
36        }
37        /// Get the value of the `form` attribute
38        pub fn form(&self) -> std::option::Option<&str> {
39            self.sys.form.as_deref()
40        }
41        /// Set the value of the `form` attribute
42        pub fn set_form(
43            &mut self,
44            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
45        ) {
46            self.sys.form = value.map(|v| v.into());
47        }
48        /// Get the value of the `formaction` attribute
49        pub fn form_action(&self) -> std::option::Option<&str> {
50            self.sys.form_action.as_deref()
51        }
52        /// Set the value of the `formaction` attribute
53        pub fn set_form_action(
54            &mut self,
55            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
56        ) {
57            self.sys.form_action = value.map(|v| v.into());
58        }
59        /// Get the value of the `formenctype` attribute
60        pub fn form_enctype(&self) -> std::option::Option<&str> {
61            self.sys.form_enctype.as_deref()
62        }
63        /// Set the value of the `formenctype` attribute
64        pub fn set_form_enctype(
65            &mut self,
66            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
67        ) {
68            self.sys.form_enctype = value.map(|v| v.into());
69        }
70        /// Get the value of the `formmethod` attribute
71        pub fn form_method(&self) -> std::option::Option<&str> {
72            self.sys.form_method.as_deref()
73        }
74        /// Set the value of the `formmethod` attribute
75        pub fn set_form_method(
76            &mut self,
77            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
78        ) {
79            self.sys.form_method = value.map(|v| v.into());
80        }
81        /// Get the value of the `formnovalidate` attribute
82        pub fn form_no_validate(&self) -> bool {
83            self.sys.form_no_validate
84        }
85        /// Set the value of the `formnovalidate` attribute
86        pub fn set_form_no_validate(&mut self, value: bool) {
87            self.sys.form_no_validate = value;
88        }
89        /// Get the value of the `formtarget` attribute
90        pub fn form_target(&self) -> std::option::Option<&str> {
91            self.sys.form_target.as_deref()
92        }
93        /// Set the value of the `formtarget` attribute
94        pub fn set_form_target(
95            &mut self,
96            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
97        ) {
98            self.sys.form_target = value.map(|v| v.into());
99        }
100        /// Get the value of the `name` attribute
101        pub fn name(&self) -> std::option::Option<&str> {
102            self.sys.name.as_deref()
103        }
104        /// Set the value of the `name` attribute
105        pub fn set_name(
106            &mut self,
107            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
108        ) {
109            self.sys.name = value.map(|v| v.into());
110        }
111        /// Get the value of the `popovertarget` attribute
112        pub fn popovertarget(&self) -> std::option::Option<&str> {
113            self.sys.popovertarget.as_deref()
114        }
115        /// Set the value of the `popovertarget` attribute
116        pub fn set_popovertarget(
117            &mut self,
118            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
119        ) {
120            self.sys.popovertarget = value.map(|v| v.into());
121        }
122        /// Get the value of the `popovertargetaction` attribute
123        pub fn popovertargetaction(&self) -> std::option::Option<&str> {
124            self.sys.popovertargetaction.as_deref()
125        }
126        /// Set the value of the `popovertargetaction` attribute
127        pub fn set_popovertargetaction(
128            &mut self,
129            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
130        ) {
131            self.sys.popovertargetaction = value.map(|v| v.into());
132        }
133        /// Get the value of the `type` attribute
134        pub fn type_(&self) -> std::option::Option<&str> {
135            self.sys.type_.as_deref()
136        }
137        /// Set the value of the `type` attribute
138        pub fn set_type_(
139            &mut self,
140            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
141        ) {
142            self.sys.type_ = value.map(|v| v.into());
143        }
144        /// Get the value of the `value` attribute
145        pub fn value(&self) -> std::option::Option<&str> {
146            self.sys.value.as_deref()
147        }
148        /// Set the value of the `value` attribute
149        pub fn set_value(
150            &mut self,
151            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
152        ) {
153            self.sys.value = value.map(|v| v.into());
154        }
155        /// Get the value of the `role` attribute
156        pub fn role(&self) -> std::option::Option<&str> {
157            self.sys.role.as_deref()
158        }
159        /// Set the value of the `role` attribute
160        pub fn set_role(
161            &mut self,
162            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
163        ) {
164            self.sys.role = value.map(|v| v.into());
165        }
166        /// Get the value of the `aria-activedescendant` attribute
167        pub fn aria_active_descendant_element(&self) -> std::option::Option<&str> {
168            self.sys.aria_active_descendant_element.as_deref()
169        }
170        /// Set the value of the `aria-activedescendant` attribute
171        pub fn set_aria_active_descendant_element(
172            &mut self,
173            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
174        ) {
175            self.sys.aria_active_descendant_element = value.map(|v| v.into());
176        }
177        /// Get the value of the `aria-atomic` attribute
178        pub fn aria_atomic(&self) -> bool {
179            self.sys.aria_atomic
180        }
181        /// Set the value of the `aria-atomic` attribute
182        pub fn set_aria_atomic(&mut self, value: bool) {
183            self.sys.aria_atomic = value;
184        }
185        /// Get the value of the `aria-autocomplete` attribute
186        pub fn aria_auto_complete(&self) -> std::option::Option<&str> {
187            self.sys.aria_auto_complete.as_deref()
188        }
189        /// Set the value of the `aria-autocomplete` attribute
190        pub fn set_aria_auto_complete(
191            &mut self,
192            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
193        ) {
194            self.sys.aria_auto_complete = value.map(|v| v.into());
195        }
196        /// Get the value of the `aria-braillelabel` attribute
197        pub fn aria_braille_label(&self) -> std::option::Option<&str> {
198            self.sys.aria_braille_label.as_deref()
199        }
200        /// Set the value of the `aria-braillelabel` attribute
201        pub fn set_aria_braille_label(
202            &mut self,
203            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
204        ) {
205            self.sys.aria_braille_label = value.map(|v| v.into());
206        }
207        /// Get the value of the `aria-brailleroledescription` attribute
208        pub fn aria_braille_role_description(&self) -> std::option::Option<&str> {
209            self.sys.aria_braille_role_description.as_deref()
210        }
211        /// Set the value of the `aria-brailleroledescription` attribute
212        pub fn set_aria_braille_role_description(
213            &mut self,
214            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
215        ) {
216            self.sys.aria_braille_role_description = value.map(|v| v.into());
217        }
218        /// Get the value of the `aria-busy` attribute
219        pub fn aria_busy(&self) -> bool {
220            self.sys.aria_busy
221        }
222        /// Set the value of the `aria-busy` attribute
223        pub fn set_aria_busy(&mut self, value: bool) {
224            self.sys.aria_busy = value;
225        }
226        /// Get the value of the `aria-checked` attribute
227        pub fn aria_checked(&self) -> std::option::Option<&str> {
228            self.sys.aria_checked.as_deref()
229        }
230        /// Set the value of the `aria-checked` attribute
231        pub fn set_aria_checked(
232            &mut self,
233            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
234        ) {
235            self.sys.aria_checked = value.map(|v| v.into());
236        }
237        /// Get the value of the `aria-colindex` attribute
238        pub fn aria_col_index(&self) -> std::option::Option<i64> {
239            self.sys.aria_col_index
240        }
241        /// Set the value of the `aria-colindex` attribute
242        pub fn set_aria_col_index(&mut self, value: std::option::Option<i64>) {
243            self.sys.aria_col_index = value;
244        }
245        /// Get the value of the `aria-colindextext` attribute
246        pub fn aria_col_index_text(&self) -> std::option::Option<&str> {
247            self.sys.aria_col_index_text.as_deref()
248        }
249        /// Set the value of the `aria-colindextext` attribute
250        pub fn set_aria_col_index_text(
251            &mut self,
252            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
253        ) {
254            self.sys.aria_col_index_text = value.map(|v| v.into());
255        }
256        /// Get the value of the `aria-colspan` attribute
257        pub fn aria_col_span(&self) -> std::option::Option<i64> {
258            self.sys.aria_col_span
259        }
260        /// Set the value of the `aria-colspan` attribute
261        pub fn set_aria_col_span(&mut self, value: std::option::Option<i64>) {
262            self.sys.aria_col_span = value;
263        }
264        /// Get the value of the `aria-controls` attribute
265        pub fn aria_controls_elements(&self) -> std::option::Option<&str> {
266            self.sys.aria_controls_elements.as_deref()
267        }
268        /// Set the value of the `aria-controls` attribute
269        pub fn set_aria_controls_elements(
270            &mut self,
271            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
272        ) {
273            self.sys.aria_controls_elements = value.map(|v| v.into());
274        }
275        /// Get the value of the `aria-current` attribute
276        pub fn aria_current(&self) -> std::option::Option<&str> {
277            self.sys.aria_current.as_deref()
278        }
279        /// Set the value of the `aria-current` attribute
280        pub fn set_aria_current(
281            &mut self,
282            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
283        ) {
284            self.sys.aria_current = value.map(|v| v.into());
285        }
286        /// Get the value of the `aria-describedby` attribute
287        pub fn aria_described_by_elements(&self) -> std::option::Option<&str> {
288            self.sys.aria_described_by_elements.as_deref()
289        }
290        /// Set the value of the `aria-describedby` attribute
291        pub fn set_aria_described_by_elements(
292            &mut self,
293            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
294        ) {
295            self.sys.aria_described_by_elements = value.map(|v| v.into());
296        }
297        /// Get the value of the `aria-description` attribute
298        pub fn aria_description(&self) -> std::option::Option<&str> {
299            self.sys.aria_description.as_deref()
300        }
301        /// Set the value of the `aria-description` attribute
302        pub fn set_aria_description(
303            &mut self,
304            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
305        ) {
306            self.sys.aria_description = value.map(|v| v.into());
307        }
308        /// Get the value of the `aria-details` attribute
309        pub fn aria_details_elements(&self) -> std::option::Option<&str> {
310            self.sys.aria_details_elements.as_deref()
311        }
312        /// Set the value of the `aria-details` attribute
313        pub fn set_aria_details_elements(
314            &mut self,
315            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
316        ) {
317            self.sys.aria_details_elements = value.map(|v| v.into());
318        }
319        /// Get the value of the `aria-disabled` attribute
320        pub fn aria_disabled(&self) -> bool {
321            self.sys.aria_disabled
322        }
323        /// Set the value of the `aria-disabled` attribute
324        pub fn set_aria_disabled(&mut self, value: bool) {
325            self.sys.aria_disabled = value;
326        }
327        /// Get the value of the `aria-dropeffect` attribute
328        pub fn aria_drop_effect(&self) -> std::option::Option<&str> {
329            self.sys.aria_drop_effect.as_deref()
330        }
331        /// Set the value of the `aria-dropeffect` attribute
332        pub fn set_aria_drop_effect(
333            &mut self,
334            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
335        ) {
336            self.sys.aria_drop_effect = value.map(|v| v.into());
337        }
338        /// Get the value of the `aria-errormessage` attribute
339        pub fn aria_error_message_elements(&self) -> std::option::Option<&str> {
340            self.sys.aria_error_message_elements.as_deref()
341        }
342        /// Set the value of the `aria-errormessage` attribute
343        pub fn set_aria_error_message_elements(
344            &mut self,
345            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
346        ) {
347            self.sys.aria_error_message_elements = value.map(|v| v.into());
348        }
349        /// Get the value of the `aria-expanded` attribute
350        pub fn aria_expanded(&self) -> bool {
351            self.sys.aria_expanded
352        }
353        /// Set the value of the `aria-expanded` attribute
354        pub fn set_aria_expanded(&mut self, value: bool) {
355            self.sys.aria_expanded = value;
356        }
357        /// Get the value of the `aria-flowto` attribute
358        pub fn aria_flow_to_elements(&self) -> std::option::Option<&str> {
359            self.sys.aria_flow_to_elements.as_deref()
360        }
361        /// Set the value of the `aria-flowto` attribute
362        pub fn set_aria_flow_to_elements(
363            &mut self,
364            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
365        ) {
366            self.sys.aria_flow_to_elements = value.map(|v| v.into());
367        }
368        /// Get the value of the `aria-grabbed` attribute
369        pub fn aria_grabbed(&self) -> bool {
370            self.sys.aria_grabbed
371        }
372        /// Set the value of the `aria-grabbed` attribute
373        pub fn set_aria_grabbed(&mut self, value: bool) {
374            self.sys.aria_grabbed = value;
375        }
376        /// Get the value of the `aria-haspopup` attribute
377        pub fn aria_has_popup(&self) -> std::option::Option<&str> {
378            self.sys.aria_has_popup.as_deref()
379        }
380        /// Set the value of the `aria-haspopup` attribute
381        pub fn set_aria_has_popup(
382            &mut self,
383            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
384        ) {
385            self.sys.aria_has_popup = value.map(|v| v.into());
386        }
387        /// Get the value of the `aria-hidden` attribute
388        pub fn aria_hidden(&self) -> bool {
389            self.sys.aria_hidden
390        }
391        /// Set the value of the `aria-hidden` attribute
392        pub fn set_aria_hidden(&mut self, value: bool) {
393            self.sys.aria_hidden = value;
394        }
395        /// Get the value of the `aria-invalid` attribute
396        pub fn aria_invalid(&self) -> std::option::Option<&str> {
397            self.sys.aria_invalid.as_deref()
398        }
399        /// Set the value of the `aria-invalid` attribute
400        pub fn set_aria_invalid(
401            &mut self,
402            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
403        ) {
404            self.sys.aria_invalid = value.map(|v| v.into());
405        }
406        /// Get the value of the `aria-keyshortcuts` attribute
407        pub fn aria_key_shortcuts(&self) -> std::option::Option<&str> {
408            self.sys.aria_key_shortcuts.as_deref()
409        }
410        /// Set the value of the `aria-keyshortcuts` attribute
411        pub fn set_aria_key_shortcuts(
412            &mut self,
413            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
414        ) {
415            self.sys.aria_key_shortcuts = value.map(|v| v.into());
416        }
417        /// Get the value of the `aria-label` attribute
418        pub fn aria_label(&self) -> std::option::Option<&str> {
419            self.sys.aria_label.as_deref()
420        }
421        /// Set the value of the `aria-label` attribute
422        pub fn set_aria_label(
423            &mut self,
424            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
425        ) {
426            self.sys.aria_label = value.map(|v| v.into());
427        }
428        /// Get the value of the `aria-labelledby` attribute
429        pub fn aria_labelled_by_elements(&self) -> std::option::Option<&str> {
430            self.sys.aria_labelled_by_elements.as_deref()
431        }
432        /// Set the value of the `aria-labelledby` attribute
433        pub fn set_aria_labelled_by_elements(
434            &mut self,
435            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
436        ) {
437            self.sys.aria_labelled_by_elements = value.map(|v| v.into());
438        }
439        /// Get the value of the `aria-level` attribute
440        pub fn aria_level(&self) -> std::option::Option<i64> {
441            self.sys.aria_level
442        }
443        /// Set the value of the `aria-level` attribute
444        pub fn set_aria_level(&mut self, value: std::option::Option<i64>) {
445            self.sys.aria_level = value;
446        }
447        /// Get the value of the `aria-live` attribute
448        pub fn aria_live(&self) -> std::option::Option<&str> {
449            self.sys.aria_live.as_deref()
450        }
451        /// Set the value of the `aria-live` attribute
452        pub fn set_aria_live(
453            &mut self,
454            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
455        ) {
456            self.sys.aria_live = value.map(|v| v.into());
457        }
458        /// Get the value of the `aria-orientation` attribute
459        pub fn aria_orientation(&self) -> std::option::Option<&str> {
460            self.sys.aria_orientation.as_deref()
461        }
462        /// Set the value of the `aria-orientation` attribute
463        pub fn set_aria_orientation(
464            &mut self,
465            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
466        ) {
467            self.sys.aria_orientation = value.map(|v| v.into());
468        }
469        /// Get the value of the `aria-owns` attribute
470        pub fn aria_owns_elements(&self) -> std::option::Option<&str> {
471            self.sys.aria_owns_elements.as_deref()
472        }
473        /// Set the value of the `aria-owns` attribute
474        pub fn set_aria_owns_elements(
475            &mut self,
476            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
477        ) {
478            self.sys.aria_owns_elements = value.map(|v| v.into());
479        }
480        /// Get the value of the `aria-posinset` attribute
481        pub fn aria_pos_in_set(&self) -> std::option::Option<i64> {
482            self.sys.aria_pos_in_set
483        }
484        /// Set the value of the `aria-posinset` attribute
485        pub fn set_aria_pos_in_set(&mut self, value: std::option::Option<i64>) {
486            self.sys.aria_pos_in_set = value;
487        }
488        /// Get the value of the `aria-pressed` attribute
489        pub fn aria_pressed(&self) -> std::option::Option<&str> {
490            self.sys.aria_pressed.as_deref()
491        }
492        /// Set the value of the `aria-pressed` attribute
493        pub fn set_aria_pressed(
494            &mut self,
495            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
496        ) {
497            self.sys.aria_pressed = value.map(|v| v.into());
498        }
499        /// Get the value of the `aria-readonly` attribute
500        pub fn aria_read_only(&self) -> bool {
501            self.sys.aria_read_only
502        }
503        /// Set the value of the `aria-readonly` attribute
504        pub fn set_aria_read_only(&mut self, value: bool) {
505            self.sys.aria_read_only = value;
506        }
507        /// Get the value of the `aria-relevant` attribute
508        pub fn aria_relevant(&self) -> std::option::Option<&str> {
509            self.sys.aria_relevant.as_deref()
510        }
511        /// Set the value of the `aria-relevant` attribute
512        pub fn set_aria_relevant(
513            &mut self,
514            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
515        ) {
516            self.sys.aria_relevant = value.map(|v| v.into());
517        }
518        /// Get the value of the `aria-required` attribute
519        pub fn aria_required(&self) -> bool {
520            self.sys.aria_required
521        }
522        /// Set the value of the `aria-required` attribute
523        pub fn set_aria_required(&mut self, value: bool) {
524            self.sys.aria_required = value;
525        }
526        /// Get the value of the `aria-roledescription` attribute
527        pub fn aria_role_description(&self) -> std::option::Option<&str> {
528            self.sys.aria_role_description.as_deref()
529        }
530        /// Set the value of the `aria-roledescription` attribute
531        pub fn set_aria_role_description(
532            &mut self,
533            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
534        ) {
535            self.sys.aria_role_description = value.map(|v| v.into());
536        }
537        /// Get the value of the `aria-rowindex` attribute
538        pub fn aria_row_index(&self) -> std::option::Option<i64> {
539            self.sys.aria_row_index
540        }
541        /// Set the value of the `aria-rowindex` attribute
542        pub fn set_aria_row_index(&mut self, value: std::option::Option<i64>) {
543            self.sys.aria_row_index = value;
544        }
545        /// Get the value of the `aria-rowindextext` attribute
546        pub fn aria_row_index_text(&self) -> std::option::Option<&str> {
547            self.sys.aria_row_index_text.as_deref()
548        }
549        /// Set the value of the `aria-rowindextext` attribute
550        pub fn set_aria_row_index_text(
551            &mut self,
552            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
553        ) {
554            self.sys.aria_row_index_text = value.map(|v| v.into());
555        }
556        /// Get the value of the `aria-rowspan` attribute
557        pub fn aria_row_span(&self) -> std::option::Option<i64> {
558            self.sys.aria_row_span
559        }
560        /// Set the value of the `aria-rowspan` attribute
561        pub fn set_aria_row_span(&mut self, value: std::option::Option<i64>) {
562            self.sys.aria_row_span = value;
563        }
564        /// Get the value of the `aria-selected` attribute
565        pub fn aria_selected(&self) -> bool {
566            self.sys.aria_selected
567        }
568        /// Set the value of the `aria-selected` attribute
569        pub fn set_aria_selected(&mut self, value: bool) {
570            self.sys.aria_selected = value;
571        }
572        /// Get the value of the `aria-setsize` attribute
573        pub fn aria_set_size(&self) -> std::option::Option<i64> {
574            self.sys.aria_set_size
575        }
576        /// Set the value of the `aria-setsize` attribute
577        pub fn set_aria_set_size(&mut self, value: std::option::Option<i64>) {
578            self.sys.aria_set_size = value;
579        }
580        /// Get the value of the `aria-valuemax` attribute
581        pub fn aria_value_max(&self) -> std::option::Option<f64> {
582            self.sys.aria_value_max
583        }
584        /// Set the value of the `aria-valuemax` attribute
585        pub fn set_aria_value_max(&mut self, value: std::option::Option<f64>) {
586            self.sys.aria_value_max = value;
587        }
588        /// Get the value of the `aria-valuemin` attribute
589        pub fn aria_value_min(&self) -> std::option::Option<f64> {
590            self.sys.aria_value_min
591        }
592        /// Set the value of the `aria-valuemin` attribute
593        pub fn set_aria_value_min(&mut self, value: std::option::Option<f64>) {
594            self.sys.aria_value_min = value;
595        }
596        /// Get the value of the `aria-valuetext` attribute
597        pub fn aria_value_text(&self) -> std::option::Option<&str> {
598            self.sys.aria_value_text.as_deref()
599        }
600        /// Set the value of the `aria-valuetext` attribute
601        pub fn set_aria_value_text(
602            &mut self,
603            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
604        ) {
605            self.sys.aria_value_text = value.map(|v| v.into());
606        }
607        /// Get the value of the `accesskey` attribute
608        pub fn access_key(&self) -> std::option::Option<&str> {
609            self.sys.access_key.as_deref()
610        }
611        /// Set the value of the `accesskey` attribute
612        pub fn set_access_key(
613            &mut self,
614            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
615        ) {
616            self.sys.access_key = value.map(|v| v.into());
617        }
618        /// Get the value of the `autocapitalize` attribute
619        pub fn auto_capitalize(&self) -> std::option::Option<&str> {
620            self.sys.auto_capitalize.as_deref()
621        }
622        /// Set the value of the `autocapitalize` attribute
623        pub fn set_auto_capitalize(
624            &mut self,
625            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
626        ) {
627            self.sys.auto_capitalize = value.map(|v| v.into());
628        }
629        /// Get the value of the `autofocus` attribute
630        pub fn autofocus(&self) -> bool {
631            self.sys.autofocus
632        }
633        /// Set the value of the `autofocus` attribute
634        pub fn set_autofocus(&mut self, value: bool) {
635            self.sys.autofocus = value;
636        }
637        /// Get the value of the `class` attribute
638        pub fn class(&self) -> std::option::Option<&str> {
639            self.sys.class.as_deref()
640        }
641        /// Set the value of the `class` attribute
642        pub fn set_class(
643            &mut self,
644            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
645        ) {
646            self.sys.class = value.map(|v| v.into());
647        }
648        /// Get the value of the `contenteditable` attribute
649        pub fn content_editable(&self) -> std::option::Option<&str> {
650            self.sys.content_editable.as_deref()
651        }
652        /// Set the value of the `contenteditable` attribute
653        pub fn set_content_editable(
654            &mut self,
655            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
656        ) {
657            self.sys.content_editable = value.map(|v| v.into());
658        }
659        /// Get the value of the `dir` attribute
660        pub fn direction(&self) -> std::option::Option<&str> {
661            self.sys.direction.as_deref()
662        }
663        /// Set the value of the `dir` attribute
664        pub fn set_direction(
665            &mut self,
666            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
667        ) {
668            self.sys.direction = value.map(|v| v.into());
669        }
670        /// Get the value of the `draggable` attribute
671        pub fn draggable(&self) -> bool {
672            self.sys.draggable
673        }
674        /// Set the value of the `draggable` attribute
675        pub fn set_draggable(&mut self, value: bool) {
676            self.sys.draggable = value;
677        }
678        /// Get the value of the `enterkeyhint` attribute
679        pub fn enter_key_hint(&self) -> std::option::Option<&str> {
680            self.sys.enter_key_hint.as_deref()
681        }
682        /// Set the value of the `enterkeyhint` attribute
683        pub fn set_enter_key_hint(
684            &mut self,
685            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
686        ) {
687            self.sys.enter_key_hint = value.map(|v| v.into());
688        }
689        /// Get the value of the `exportparts` attribute
690        pub fn export_parts(&self) -> std::option::Option<&str> {
691            self.sys.export_parts.as_deref()
692        }
693        /// Set the value of the `exportparts` attribute
694        pub fn set_export_parts(
695            &mut self,
696            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
697        ) {
698            self.sys.export_parts = value.map(|v| v.into());
699        }
700        /// Get the value of the `hidden` attribute
701        pub fn hidden(&self) -> std::option::Option<&str> {
702            self.sys.hidden.as_deref()
703        }
704        /// Set the value of the `hidden` attribute
705        pub fn set_hidden(
706            &mut self,
707            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
708        ) {
709            self.sys.hidden = value.map(|v| v.into());
710        }
711        /// Get the value of the `id` attribute
712        pub fn id(&self) -> std::option::Option<&str> {
713            self.sys.id.as_deref()
714        }
715        /// Set the value of the `id` attribute
716        pub fn set_id(
717            &mut self,
718            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
719        ) {
720            self.sys.id = value.map(|v| v.into());
721        }
722        /// Get the value of the `inert` attribute
723        pub fn inert(&self) -> bool {
724            self.sys.inert
725        }
726        /// Set the value of the `inert` attribute
727        pub fn set_inert(&mut self, value: bool) {
728            self.sys.inert = value;
729        }
730        /// Get the value of the `inputmode` attribute
731        pub fn input_mode(&self) -> std::option::Option<&str> {
732            self.sys.input_mode.as_deref()
733        }
734        /// Set the value of the `inputmode` attribute
735        pub fn set_input_mode(
736            &mut self,
737            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
738        ) {
739            self.sys.input_mode = value.map(|v| v.into());
740        }
741        /// Get the value of the `is` attribute
742        pub fn is_(&self) -> std::option::Option<&str> {
743            self.sys.is_.as_deref()
744        }
745        /// Set the value of the `is` attribute
746        pub fn set_is_(
747            &mut self,
748            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
749        ) {
750            self.sys.is_ = value.map(|v| v.into());
751        }
752        /// Get the value of the `itemid` attribute
753        pub fn item_id(&self) -> std::option::Option<&str> {
754            self.sys.item_id.as_deref()
755        }
756        /// Set the value of the `itemid` attribute
757        pub fn set_item_id(
758            &mut self,
759            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
760        ) {
761            self.sys.item_id = value.map(|v| v.into());
762        }
763        /// Get the value of the `itemprop` attribute
764        pub fn item_prop(&self) -> std::option::Option<&str> {
765            self.sys.item_prop.as_deref()
766        }
767        /// Set the value of the `itemprop` attribute
768        pub fn set_item_prop(
769            &mut self,
770            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
771        ) {
772            self.sys.item_prop = value.map(|v| v.into());
773        }
774        /// Get the value of the `itemref` attribute
775        pub fn item_ref(&self) -> std::option::Option<&str> {
776            self.sys.item_ref.as_deref()
777        }
778        /// Set the value of the `itemref` attribute
779        pub fn set_item_ref(
780            &mut self,
781            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
782        ) {
783            self.sys.item_ref = value.map(|v| v.into());
784        }
785        /// Get the value of the `itemscope` attribute
786        pub fn item_scope(&self) -> std::option::Option<&str> {
787            self.sys.item_scope.as_deref()
788        }
789        /// Set the value of the `itemscope` attribute
790        pub fn set_item_scope(
791            &mut self,
792            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
793        ) {
794            self.sys.item_scope = value.map(|v| v.into());
795        }
796        /// Get the value of the `itemtype` attribute
797        pub fn item_type(&self) -> std::option::Option<&str> {
798            self.sys.item_type.as_deref()
799        }
800        /// Set the value of the `itemtype` attribute
801        pub fn set_item_type(
802            &mut self,
803            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
804        ) {
805            self.sys.item_type = value.map(|v| v.into());
806        }
807        /// Get the value of the `lang` attribute
808        pub fn lang(&self) -> std::option::Option<&str> {
809            self.sys.lang.as_deref()
810        }
811        /// Set the value of the `lang` attribute
812        pub fn set_lang(
813            &mut self,
814            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
815        ) {
816            self.sys.lang = value.map(|v| v.into());
817        }
818        /// Get the value of the `nonce` attribute
819        pub fn nonce(&self) -> std::option::Option<&str> {
820            self.sys.nonce.as_deref()
821        }
822        /// Set the value of the `nonce` attribute
823        pub fn set_nonce(
824            &mut self,
825            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
826        ) {
827            self.sys.nonce = value.map(|v| v.into());
828        }
829        /// Get the value of the `part` attribute
830        pub fn part(&self) -> std::option::Option<&str> {
831            self.sys.part.as_deref()
832        }
833        /// Set the value of the `part` attribute
834        pub fn set_part(
835            &mut self,
836            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
837        ) {
838            self.sys.part = value.map(|v| v.into());
839        }
840        /// Get the value of the `slot` attribute
841        pub fn slot(&self) -> std::option::Option<&str> {
842            self.sys.slot.as_deref()
843        }
844        /// Set the value of the `slot` attribute
845        pub fn set_slot(
846            &mut self,
847            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
848        ) {
849            self.sys.slot = value.map(|v| v.into());
850        }
851        /// Get the value of the `spellcheck` attribute
852        pub fn spellcheck(&self) -> std::option::Option<&str> {
853            self.sys.spellcheck.as_deref()
854        }
855        /// Set the value of the `spellcheck` attribute
856        pub fn set_spellcheck(
857            &mut self,
858            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
859        ) {
860            self.sys.spellcheck = value.map(|v| v.into());
861        }
862        /// Get the value of the `style` attribute
863        pub fn style(&self) -> std::option::Option<&str> {
864            self.sys.style.as_deref()
865        }
866        /// Set the value of the `style` attribute
867        pub fn set_style(
868            &mut self,
869            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
870        ) {
871            self.sys.style = value.map(|v| v.into());
872        }
873        /// Get the value of the `tabindex` attribute
874        pub fn tab_index(&self) -> std::option::Option<i64> {
875            self.sys.tab_index
876        }
877        /// Set the value of the `tabindex` attribute
878        pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
879            self.sys.tab_index = value;
880        }
881        /// Get the value of the `title` attribute
882        pub fn title(&self) -> std::option::Option<&str> {
883            self.sys.title.as_deref()
884        }
885        /// Set the value of the `title` attribute
886        pub fn set_title(
887            &mut self,
888            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
889        ) {
890            self.sys.title = value.map(|v| v.into());
891        }
892        /// Get the value of the `translate` attribute
893        pub fn translate(&self) -> bool {
894            self.sys.translate
895        }
896        /// Set the value of the `translate` attribute
897        pub fn set_translate(&mut self, value: bool) {
898            self.sys.translate = value;
899        }
900    }
901    impl Button {
902        /// Access the element's children
903        pub fn children(&self) -> &[super::child::ButtonChild] {
904            self.children.as_ref()
905        }
906        /// Mutably access the element's children
907        pub fn children_mut(&mut self) -> &mut Vec<super::child::ButtonChild> {
908            &mut self.children
909        }
910    }
911    impl crate::Render for Button {
912        fn render(
913            &self,
914            f: &mut std::fmt::Formatter<'_>,
915            depth: usize,
916        ) -> std::fmt::Result {
917            write!(f, "{:level$}", "", level = depth * 4)?;
918            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
919            if !self.children.is_empty() {
920                write!(f, "\n")?;
921            }
922            for el in &self.children {
923                crate::Render::render(&el, f, depth)?;
924                write!(f, "\n")?;
925            }
926            write!(f, "{:level$}", "", level = depth * 4)?;
927            html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
928            Ok(())
929        }
930    }
931    impl std::fmt::Debug for Button {
932        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
933            crate::Render::render(self, f, 0)?;
934            Ok(())
935        }
936    }
937    impl std::fmt::Display for Button {
938        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
939            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
940            for el in &self.children {
941                write!(f, "{el}")?;
942            }
943            html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
944            Ok(())
945        }
946    }
947    impl crate::HtmlElement for Button {}
948    impl crate::FlowContent for Button {}
949    impl crate::PhrasingContent for Button {}
950    impl crate::InteractiveContent for Button {}
951    impl crate::PalpableContent for Button {}
952    impl std::convert::Into<html_sys::forms::Button> for Button {
953        fn into(self) -> html_sys::forms::Button {
954            self.sys
955        }
956    }
957    impl From<html_sys::forms::Button> for Button {
958        fn from(sys: html_sys::forms::Button) -> Self {
959            Self { sys, children: vec![] }
960        }
961    }
962}
963pub mod child {
964    /// The permitted child items for the `Button` element
965    #[derive(PartialEq, Clone)]
966    pub enum ButtonChild {
967        /// The Abbreviation element
968        Abbreviation(crate::generated::all::Abbreviation),
969        /// The Anchor element
970        Anchor(crate::generated::all::Anchor),
971        /// The Audio element
972        Audio(crate::generated::all::Audio),
973        /// The BidirectionalIsolate element
974        BidirectionalIsolate(crate::generated::all::BidirectionalIsolate),
975        /// The BidirectionalTextOverride element
976        BidirectionalTextOverride(crate::generated::all::BidirectionalTextOverride),
977        /// The Bold element
978        Bold(crate::generated::all::Bold),
979        /// The Button element
980        Button(crate::generated::all::Button),
981        /// The Canvas element
982        Canvas(crate::generated::all::Canvas),
983        /// The Cite element
984        Cite(crate::generated::all::Cite),
985        /// The Code element
986        Code(crate::generated::all::Code),
987        /// The Data element
988        Data(crate::generated::all::Data),
989        /// The DataList element
990        DataList(crate::generated::all::DataList),
991        /// The Definition element
992        Definition(crate::generated::all::Definition),
993        /// The DeletedText element
994        DeletedText(crate::generated::all::DeletedText),
995        /// The Embed element
996        Embed(crate::generated::all::Embed),
997        /// The Emphasis element
998        Emphasis(crate::generated::all::Emphasis),
999        /// The Iframe element
1000        Iframe(crate::generated::all::Iframe),
1001        /// The Image element
1002        Image(crate::generated::all::Image),
1003        /// The ImageMap element
1004        ImageMap(crate::generated::all::ImageMap),
1005        /// The ImageMapArea element
1006        ImageMapArea(crate::generated::all::ImageMapArea),
1007        /// The Input element
1008        Input(crate::generated::all::Input),
1009        /// The InsertedText element
1010        InsertedText(crate::generated::all::InsertedText),
1011        /// The Italic element
1012        Italic(crate::generated::all::Italic),
1013        /// The KeyboardInput element
1014        KeyboardInput(crate::generated::all::KeyboardInput),
1015        /// The Label element
1016        Label(crate::generated::all::Label),
1017        /// The LineBreak element
1018        LineBreak(crate::generated::all::LineBreak),
1019        /// The LineBreakOpportunity element
1020        LineBreakOpportunity(crate::generated::all::LineBreakOpportunity),
1021        /// The Link element
1022        Link(crate::generated::all::Link),
1023        /// The MarkText element
1024        MarkText(crate::generated::all::MarkText),
1025        /// The Meta element
1026        Meta(crate::generated::all::Meta),
1027        /// The Meter element
1028        Meter(crate::generated::all::Meter),
1029        /// The NoScript element
1030        NoScript(crate::generated::all::NoScript),
1031        /// The Object element
1032        Object(crate::generated::all::Object),
1033        /// The Output element
1034        Output(crate::generated::all::Output),
1035        /// The Picture element
1036        Picture(crate::generated::all::Picture),
1037        /// The Progress element
1038        Progress(crate::generated::all::Progress),
1039        /// The Quotation element
1040        Quotation(crate::generated::all::Quotation),
1041        /// The RubyAnnotation element
1042        RubyAnnotation(crate::generated::all::RubyAnnotation),
1043        /// The SampleOutput element
1044        SampleOutput(crate::generated::all::SampleOutput),
1045        /// The Script element
1046        Script(crate::generated::all::Script),
1047        /// The Select element
1048        Select(crate::generated::all::Select),
1049        /// The SideComment element
1050        SideComment(crate::generated::all::SideComment),
1051        /// The Slot element
1052        Slot(crate::generated::all::Slot),
1053        /// The Span element
1054        Span(crate::generated::all::Span),
1055        /// The StrikeThrough element
1056        StrikeThrough(crate::generated::all::StrikeThrough),
1057        /// The Strong element
1058        Strong(crate::generated::all::Strong),
1059        /// The SubScript element
1060        SubScript(crate::generated::all::SubScript),
1061        /// The SuperScript element
1062        SuperScript(crate::generated::all::SuperScript),
1063        /// The Template element
1064        Template(crate::generated::all::Template),
1065        /// The Text element
1066        Text(std::borrow::Cow<'static, str>),
1067        /// The TextArea element
1068        TextArea(crate::generated::all::TextArea),
1069        /// The Time element
1070        Time(crate::generated::all::Time),
1071        /// The Underline element
1072        Underline(crate::generated::all::Underline),
1073        /// The Variable element
1074        Variable(crate::generated::all::Variable),
1075        /// The Video element
1076        Video(crate::generated::all::Video),
1077    }
1078    impl std::convert::From<crate::generated::all::Abbreviation> for ButtonChild {
1079        fn from(value: crate::generated::all::Abbreviation) -> Self {
1080            Self::Abbreviation(value)
1081        }
1082    }
1083    impl std::convert::From<crate::generated::all::Anchor> for ButtonChild {
1084        fn from(value: crate::generated::all::Anchor) -> Self {
1085            Self::Anchor(value)
1086        }
1087    }
1088    impl std::convert::From<crate::generated::all::Audio> for ButtonChild {
1089        fn from(value: crate::generated::all::Audio) -> Self {
1090            Self::Audio(value)
1091        }
1092    }
1093    impl std::convert::From<crate::generated::all::BidirectionalIsolate>
1094    for ButtonChild {
1095        fn from(value: crate::generated::all::BidirectionalIsolate) -> Self {
1096            Self::BidirectionalIsolate(value)
1097        }
1098    }
1099    impl std::convert::From<crate::generated::all::BidirectionalTextOverride>
1100    for ButtonChild {
1101        fn from(value: crate::generated::all::BidirectionalTextOverride) -> Self {
1102            Self::BidirectionalTextOverride(value)
1103        }
1104    }
1105    impl std::convert::From<crate::generated::all::Bold> for ButtonChild {
1106        fn from(value: crate::generated::all::Bold) -> Self {
1107            Self::Bold(value)
1108        }
1109    }
1110    impl std::convert::From<crate::generated::all::Button> for ButtonChild {
1111        fn from(value: crate::generated::all::Button) -> Self {
1112            Self::Button(value)
1113        }
1114    }
1115    impl std::convert::From<crate::generated::all::Canvas> for ButtonChild {
1116        fn from(value: crate::generated::all::Canvas) -> Self {
1117            Self::Canvas(value)
1118        }
1119    }
1120    impl std::convert::From<crate::generated::all::Cite> for ButtonChild {
1121        fn from(value: crate::generated::all::Cite) -> Self {
1122            Self::Cite(value)
1123        }
1124    }
1125    impl std::convert::From<crate::generated::all::Code> for ButtonChild {
1126        fn from(value: crate::generated::all::Code) -> Self {
1127            Self::Code(value)
1128        }
1129    }
1130    impl std::convert::From<crate::generated::all::Data> for ButtonChild {
1131        fn from(value: crate::generated::all::Data) -> Self {
1132            Self::Data(value)
1133        }
1134    }
1135    impl std::convert::From<crate::generated::all::DataList> for ButtonChild {
1136        fn from(value: crate::generated::all::DataList) -> Self {
1137            Self::DataList(value)
1138        }
1139    }
1140    impl std::convert::From<crate::generated::all::Definition> for ButtonChild {
1141        fn from(value: crate::generated::all::Definition) -> Self {
1142            Self::Definition(value)
1143        }
1144    }
1145    impl std::convert::From<crate::generated::all::DeletedText> for ButtonChild {
1146        fn from(value: crate::generated::all::DeletedText) -> Self {
1147            Self::DeletedText(value)
1148        }
1149    }
1150    impl std::convert::From<crate::generated::all::Embed> for ButtonChild {
1151        fn from(value: crate::generated::all::Embed) -> Self {
1152            Self::Embed(value)
1153        }
1154    }
1155    impl std::convert::From<crate::generated::all::Emphasis> for ButtonChild {
1156        fn from(value: crate::generated::all::Emphasis) -> Self {
1157            Self::Emphasis(value)
1158        }
1159    }
1160    impl std::convert::From<crate::generated::all::Iframe> for ButtonChild {
1161        fn from(value: crate::generated::all::Iframe) -> Self {
1162            Self::Iframe(value)
1163        }
1164    }
1165    impl std::convert::From<crate::generated::all::Image> for ButtonChild {
1166        fn from(value: crate::generated::all::Image) -> Self {
1167            Self::Image(value)
1168        }
1169    }
1170    impl std::convert::From<crate::generated::all::ImageMap> for ButtonChild {
1171        fn from(value: crate::generated::all::ImageMap) -> Self {
1172            Self::ImageMap(value)
1173        }
1174    }
1175    impl std::convert::From<crate::generated::all::ImageMapArea> for ButtonChild {
1176        fn from(value: crate::generated::all::ImageMapArea) -> Self {
1177            Self::ImageMapArea(value)
1178        }
1179    }
1180    impl std::convert::From<crate::generated::all::Input> for ButtonChild {
1181        fn from(value: crate::generated::all::Input) -> Self {
1182            Self::Input(value)
1183        }
1184    }
1185    impl std::convert::From<crate::generated::all::InsertedText> for ButtonChild {
1186        fn from(value: crate::generated::all::InsertedText) -> Self {
1187            Self::InsertedText(value)
1188        }
1189    }
1190    impl std::convert::From<crate::generated::all::Italic> for ButtonChild {
1191        fn from(value: crate::generated::all::Italic) -> Self {
1192            Self::Italic(value)
1193        }
1194    }
1195    impl std::convert::From<crate::generated::all::KeyboardInput> for ButtonChild {
1196        fn from(value: crate::generated::all::KeyboardInput) -> Self {
1197            Self::KeyboardInput(value)
1198        }
1199    }
1200    impl std::convert::From<crate::generated::all::Label> for ButtonChild {
1201        fn from(value: crate::generated::all::Label) -> Self {
1202            Self::Label(value)
1203        }
1204    }
1205    impl std::convert::From<crate::generated::all::LineBreak> for ButtonChild {
1206        fn from(value: crate::generated::all::LineBreak) -> Self {
1207            Self::LineBreak(value)
1208        }
1209    }
1210    impl std::convert::From<crate::generated::all::LineBreakOpportunity>
1211    for ButtonChild {
1212        fn from(value: crate::generated::all::LineBreakOpportunity) -> Self {
1213            Self::LineBreakOpportunity(value)
1214        }
1215    }
1216    impl std::convert::From<crate::generated::all::Link> for ButtonChild {
1217        fn from(value: crate::generated::all::Link) -> Self {
1218            Self::Link(value)
1219        }
1220    }
1221    impl std::convert::From<crate::generated::all::MarkText> for ButtonChild {
1222        fn from(value: crate::generated::all::MarkText) -> Self {
1223            Self::MarkText(value)
1224        }
1225    }
1226    impl std::convert::From<crate::generated::all::Meta> for ButtonChild {
1227        fn from(value: crate::generated::all::Meta) -> Self {
1228            Self::Meta(value)
1229        }
1230    }
1231    impl std::convert::From<crate::generated::all::Meter> for ButtonChild {
1232        fn from(value: crate::generated::all::Meter) -> Self {
1233            Self::Meter(value)
1234        }
1235    }
1236    impl std::convert::From<crate::generated::all::NoScript> for ButtonChild {
1237        fn from(value: crate::generated::all::NoScript) -> Self {
1238            Self::NoScript(value)
1239        }
1240    }
1241    impl std::convert::From<crate::generated::all::Object> for ButtonChild {
1242        fn from(value: crate::generated::all::Object) -> Self {
1243            Self::Object(value)
1244        }
1245    }
1246    impl std::convert::From<crate::generated::all::Output> for ButtonChild {
1247        fn from(value: crate::generated::all::Output) -> Self {
1248            Self::Output(value)
1249        }
1250    }
1251    impl std::convert::From<crate::generated::all::Picture> for ButtonChild {
1252        fn from(value: crate::generated::all::Picture) -> Self {
1253            Self::Picture(value)
1254        }
1255    }
1256    impl std::convert::From<crate::generated::all::Progress> for ButtonChild {
1257        fn from(value: crate::generated::all::Progress) -> Self {
1258            Self::Progress(value)
1259        }
1260    }
1261    impl std::convert::From<crate::generated::all::Quotation> for ButtonChild {
1262        fn from(value: crate::generated::all::Quotation) -> Self {
1263            Self::Quotation(value)
1264        }
1265    }
1266    impl std::convert::From<crate::generated::all::RubyAnnotation> for ButtonChild {
1267        fn from(value: crate::generated::all::RubyAnnotation) -> Self {
1268            Self::RubyAnnotation(value)
1269        }
1270    }
1271    impl std::convert::From<crate::generated::all::SampleOutput> for ButtonChild {
1272        fn from(value: crate::generated::all::SampleOutput) -> Self {
1273            Self::SampleOutput(value)
1274        }
1275    }
1276    impl std::convert::From<crate::generated::all::Script> for ButtonChild {
1277        fn from(value: crate::generated::all::Script) -> Self {
1278            Self::Script(value)
1279        }
1280    }
1281    impl std::convert::From<crate::generated::all::Select> for ButtonChild {
1282        fn from(value: crate::generated::all::Select) -> Self {
1283            Self::Select(value)
1284        }
1285    }
1286    impl std::convert::From<crate::generated::all::SideComment> for ButtonChild {
1287        fn from(value: crate::generated::all::SideComment) -> Self {
1288            Self::SideComment(value)
1289        }
1290    }
1291    impl std::convert::From<crate::generated::all::Slot> for ButtonChild {
1292        fn from(value: crate::generated::all::Slot) -> Self {
1293            Self::Slot(value)
1294        }
1295    }
1296    impl std::convert::From<crate::generated::all::Span> for ButtonChild {
1297        fn from(value: crate::generated::all::Span) -> Self {
1298            Self::Span(value)
1299        }
1300    }
1301    impl std::convert::From<crate::generated::all::StrikeThrough> for ButtonChild {
1302        fn from(value: crate::generated::all::StrikeThrough) -> Self {
1303            Self::StrikeThrough(value)
1304        }
1305    }
1306    impl std::convert::From<crate::generated::all::Strong> for ButtonChild {
1307        fn from(value: crate::generated::all::Strong) -> Self {
1308            Self::Strong(value)
1309        }
1310    }
1311    impl std::convert::From<crate::generated::all::SubScript> for ButtonChild {
1312        fn from(value: crate::generated::all::SubScript) -> Self {
1313            Self::SubScript(value)
1314        }
1315    }
1316    impl std::convert::From<crate::generated::all::SuperScript> for ButtonChild {
1317        fn from(value: crate::generated::all::SuperScript) -> Self {
1318            Self::SuperScript(value)
1319        }
1320    }
1321    impl std::convert::From<crate::generated::all::Template> for ButtonChild {
1322        fn from(value: crate::generated::all::Template) -> Self {
1323            Self::Template(value)
1324        }
1325    }
1326    impl std::convert::From<std::borrow::Cow<'static, str>> for ButtonChild {
1327        fn from(value: std::borrow::Cow<'static, str>) -> Self {
1328            Self::Text(value)
1329        }
1330    }
1331    impl std::convert::From<&'static str> for ButtonChild {
1332        fn from(value: &'static str) -> Self {
1333            Self::Text(value.into())
1334        }
1335    }
1336    impl std::convert::From<String> for ButtonChild {
1337        fn from(value: String) -> Self {
1338            Self::Text(value.into())
1339        }
1340    }
1341    impl std::convert::From<crate::generated::all::TextArea> for ButtonChild {
1342        fn from(value: crate::generated::all::TextArea) -> Self {
1343            Self::TextArea(value)
1344        }
1345    }
1346    impl std::convert::From<crate::generated::all::Time> for ButtonChild {
1347        fn from(value: crate::generated::all::Time) -> Self {
1348            Self::Time(value)
1349        }
1350    }
1351    impl std::convert::From<crate::generated::all::Underline> for ButtonChild {
1352        fn from(value: crate::generated::all::Underline) -> Self {
1353            Self::Underline(value)
1354        }
1355    }
1356    impl std::convert::From<crate::generated::all::Variable> for ButtonChild {
1357        fn from(value: crate::generated::all::Variable) -> Self {
1358            Self::Variable(value)
1359        }
1360    }
1361    impl std::convert::From<crate::generated::all::Video> for ButtonChild {
1362        fn from(value: crate::generated::all::Video) -> Self {
1363            Self::Video(value)
1364        }
1365    }
1366    impl crate::Render for ButtonChild {
1367        fn render(
1368            &self,
1369            f: &mut std::fmt::Formatter<'_>,
1370            depth: usize,
1371        ) -> std::fmt::Result {
1372            match self {
1373                Self::Abbreviation(el) => crate::Render::render(el, f, depth + 1),
1374                Self::Anchor(el) => crate::Render::render(el, f, depth + 1),
1375                Self::Audio(el) => crate::Render::render(el, f, depth + 1),
1376                Self::BidirectionalIsolate(el) => crate::Render::render(el, f, depth + 1),
1377                Self::BidirectionalTextOverride(el) => {
1378                    crate::Render::render(el, f, depth + 1)
1379                }
1380                Self::Bold(el) => crate::Render::render(el, f, depth + 1),
1381                Self::Button(el) => crate::Render::render(el, f, depth + 1),
1382                Self::Canvas(el) => crate::Render::render(el, f, depth + 1),
1383                Self::Cite(el) => crate::Render::render(el, f, depth + 1),
1384                Self::Code(el) => crate::Render::render(el, f, depth + 1),
1385                Self::Data(el) => crate::Render::render(el, f, depth + 1),
1386                Self::DataList(el) => crate::Render::render(el, f, depth + 1),
1387                Self::Definition(el) => crate::Render::render(el, f, depth + 1),
1388                Self::DeletedText(el) => crate::Render::render(el, f, depth + 1),
1389                Self::Embed(el) => crate::Render::render(el, f, depth + 1),
1390                Self::Emphasis(el) => crate::Render::render(el, f, depth + 1),
1391                Self::Iframe(el) => crate::Render::render(el, f, depth + 1),
1392                Self::Image(el) => crate::Render::render(el, f, depth + 1),
1393                Self::ImageMap(el) => crate::Render::render(el, f, depth + 1),
1394                Self::ImageMapArea(el) => crate::Render::render(el, f, depth + 1),
1395                Self::Input(el) => crate::Render::render(el, f, depth + 1),
1396                Self::InsertedText(el) => crate::Render::render(el, f, depth + 1),
1397                Self::Italic(el) => crate::Render::render(el, f, depth + 1),
1398                Self::KeyboardInput(el) => crate::Render::render(el, f, depth + 1),
1399                Self::Label(el) => crate::Render::render(el, f, depth + 1),
1400                Self::LineBreak(el) => crate::Render::render(el, f, depth + 1),
1401                Self::LineBreakOpportunity(el) => crate::Render::render(el, f, depth + 1),
1402                Self::Link(el) => crate::Render::render(el, f, depth + 1),
1403                Self::MarkText(el) => crate::Render::render(el, f, depth + 1),
1404                Self::Meta(el) => crate::Render::render(el, f, depth + 1),
1405                Self::Meter(el) => crate::Render::render(el, f, depth + 1),
1406                Self::NoScript(el) => crate::Render::render(el, f, depth + 1),
1407                Self::Object(el) => crate::Render::render(el, f, depth + 1),
1408                Self::Output(el) => crate::Render::render(el, f, depth + 1),
1409                Self::Picture(el) => crate::Render::render(el, f, depth + 1),
1410                Self::Progress(el) => crate::Render::render(el, f, depth + 1),
1411                Self::Quotation(el) => crate::Render::render(el, f, depth + 1),
1412                Self::RubyAnnotation(el) => crate::Render::render(el, f, depth + 1),
1413                Self::SampleOutput(el) => crate::Render::render(el, f, depth + 1),
1414                Self::Script(el) => crate::Render::render(el, f, depth + 1),
1415                Self::Select(el) => crate::Render::render(el, f, depth + 1),
1416                Self::SideComment(el) => crate::Render::render(el, f, depth + 1),
1417                Self::Slot(el) => crate::Render::render(el, f, depth + 1),
1418                Self::Span(el) => crate::Render::render(el, f, depth + 1),
1419                Self::StrikeThrough(el) => crate::Render::render(el, f, depth + 1),
1420                Self::Strong(el) => crate::Render::render(el, f, depth + 1),
1421                Self::SubScript(el) => crate::Render::render(el, f, depth + 1),
1422                Self::SuperScript(el) => crate::Render::render(el, f, depth + 1),
1423                Self::Template(el) => crate::Render::render(el, f, depth + 1),
1424                Self::Text(el) => crate::Render::render(el, f, depth + 1),
1425                Self::TextArea(el) => crate::Render::render(el, f, depth + 1),
1426                Self::Time(el) => crate::Render::render(el, f, depth + 1),
1427                Self::Underline(el) => crate::Render::render(el, f, depth + 1),
1428                Self::Variable(el) => crate::Render::render(el, f, depth + 1),
1429                Self::Video(el) => crate::Render::render(el, f, depth + 1),
1430            }
1431        }
1432    }
1433    impl std::fmt::Debug for ButtonChild {
1434        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1435            crate::Render::render(self, f, 0)?;
1436            Ok(())
1437        }
1438    }
1439    impl std::fmt::Display for ButtonChild {
1440        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1441            match self {
1442                Self::Abbreviation(el) => write!(f, "{el}"),
1443                Self::Anchor(el) => write!(f, "{el}"),
1444                Self::Audio(el) => write!(f, "{el}"),
1445                Self::BidirectionalIsolate(el) => write!(f, "{el}"),
1446                Self::BidirectionalTextOverride(el) => write!(f, "{el}"),
1447                Self::Bold(el) => write!(f, "{el}"),
1448                Self::Button(el) => write!(f, "{el}"),
1449                Self::Canvas(el) => write!(f, "{el}"),
1450                Self::Cite(el) => write!(f, "{el}"),
1451                Self::Code(el) => write!(f, "{el}"),
1452                Self::Data(el) => write!(f, "{el}"),
1453                Self::DataList(el) => write!(f, "{el}"),
1454                Self::Definition(el) => write!(f, "{el}"),
1455                Self::DeletedText(el) => write!(f, "{el}"),
1456                Self::Embed(el) => write!(f, "{el}"),
1457                Self::Emphasis(el) => write!(f, "{el}"),
1458                Self::Iframe(el) => write!(f, "{el}"),
1459                Self::Image(el) => write!(f, "{el}"),
1460                Self::ImageMap(el) => write!(f, "{el}"),
1461                Self::ImageMapArea(el) => write!(f, "{el}"),
1462                Self::Input(el) => write!(f, "{el}"),
1463                Self::InsertedText(el) => write!(f, "{el}"),
1464                Self::Italic(el) => write!(f, "{el}"),
1465                Self::KeyboardInput(el) => write!(f, "{el}"),
1466                Self::Label(el) => write!(f, "{el}"),
1467                Self::LineBreak(el) => write!(f, "{el}"),
1468                Self::LineBreakOpportunity(el) => write!(f, "{el}"),
1469                Self::Link(el) => write!(f, "{el}"),
1470                Self::MarkText(el) => write!(f, "{el}"),
1471                Self::Meta(el) => write!(f, "{el}"),
1472                Self::Meter(el) => write!(f, "{el}"),
1473                Self::NoScript(el) => write!(f, "{el}"),
1474                Self::Object(el) => write!(f, "{el}"),
1475                Self::Output(el) => write!(f, "{el}"),
1476                Self::Picture(el) => write!(f, "{el}"),
1477                Self::Progress(el) => write!(f, "{el}"),
1478                Self::Quotation(el) => write!(f, "{el}"),
1479                Self::RubyAnnotation(el) => write!(f, "{el}"),
1480                Self::SampleOutput(el) => write!(f, "{el}"),
1481                Self::Script(el) => write!(f, "{el}"),
1482                Self::Select(el) => write!(f, "{el}"),
1483                Self::SideComment(el) => write!(f, "{el}"),
1484                Self::Slot(el) => write!(f, "{el}"),
1485                Self::Span(el) => write!(f, "{el}"),
1486                Self::StrikeThrough(el) => write!(f, "{el}"),
1487                Self::Strong(el) => write!(f, "{el}"),
1488                Self::SubScript(el) => write!(f, "{el}"),
1489                Self::SuperScript(el) => write!(f, "{el}"),
1490                Self::Template(el) => write!(f, "{el}"),
1491                Self::Text(el) => write!(f, "{el}"),
1492                Self::TextArea(el) => write!(f, "{el}"),
1493                Self::Time(el) => write!(f, "{el}"),
1494                Self::Underline(el) => write!(f, "{el}"),
1495                Self::Variable(el) => write!(f, "{el}"),
1496                Self::Video(el) => write!(f, "{el}"),
1497            }
1498        }
1499    }
1500}
1501pub mod builder {
1502    /// A builder struct for Button
1503    pub struct ButtonBuilder {
1504        element: super::element::Button,
1505    }
1506    impl ButtonBuilder {
1507        pub(crate) fn new(element: super::element::Button) -> Self {
1508            Self { element }
1509        }
1510        /// Finish building the element
1511        pub fn build(&mut self) -> super::element::Button {
1512            self.element.clone()
1513        }
1514        /// Insert a `data-*` property
1515        pub fn data(
1516            &mut self,
1517            data_key: impl Into<std::borrow::Cow<'static, str>>,
1518            value: impl Into<std::borrow::Cow<'static, str>>,
1519        ) -> &mut ButtonBuilder {
1520            self.element.data_map_mut().insert(data_key.into(), value.into());
1521            self
1522        }
1523        /// Append a new `Abbreviation` element
1524        pub fn abbreviation<F>(&mut self, f: F) -> &mut Self
1525        where
1526            F: for<'a> FnOnce(
1527                &'a mut crate::generated::all::builders::AbbreviationBuilder,
1528            ) -> &'a mut crate::generated::all::builders::AbbreviationBuilder,
1529        {
1530            let ty: crate::generated::all::Abbreviation = Default::default();
1531            let mut ty_builder = crate::generated::all::builders::AbbreviationBuilder::new(
1532                ty,
1533            );
1534            (f)(&mut ty_builder);
1535            let ty = ty_builder.build();
1536            self.element.children_mut().push(ty.into());
1537            self
1538        }
1539        /// Append a new `Anchor` element
1540        pub fn anchor<F>(&mut self, f: F) -> &mut Self
1541        where
1542            F: for<'a> FnOnce(
1543                &'a mut crate::generated::all::builders::AnchorBuilder,
1544            ) -> &'a mut crate::generated::all::builders::AnchorBuilder,
1545        {
1546            let ty: crate::generated::all::Anchor = Default::default();
1547            let mut ty_builder = crate::generated::all::builders::AnchorBuilder::new(ty);
1548            (f)(&mut ty_builder);
1549            let ty = ty_builder.build();
1550            self.element.children_mut().push(ty.into());
1551            self
1552        }
1553        /// Append a new `Audio` element
1554        pub fn audio<F>(&mut self, f: F) -> &mut Self
1555        where
1556            F: for<'a> FnOnce(
1557                &'a mut crate::generated::all::builders::AudioBuilder,
1558            ) -> &'a mut crate::generated::all::builders::AudioBuilder,
1559        {
1560            let ty: crate::generated::all::Audio = Default::default();
1561            let mut ty_builder = crate::generated::all::builders::AudioBuilder::new(ty);
1562            (f)(&mut ty_builder);
1563            let ty = ty_builder.build();
1564            self.element.children_mut().push(ty.into());
1565            self
1566        }
1567        /// Append a new `BidirectionalIsolate` element
1568        pub fn bidirectional_isolate<F>(&mut self, f: F) -> &mut Self
1569        where
1570            F: for<'a> FnOnce(
1571                &'a mut crate::generated::all::builders::BidirectionalIsolateBuilder,
1572            ) -> &'a mut crate::generated::all::builders::BidirectionalIsolateBuilder,
1573        {
1574            let ty: crate::generated::all::BidirectionalIsolate = Default::default();
1575            let mut ty_builder = crate::generated::all::builders::BidirectionalIsolateBuilder::new(
1576                ty,
1577            );
1578            (f)(&mut ty_builder);
1579            let ty = ty_builder.build();
1580            self.element.children_mut().push(ty.into());
1581            self
1582        }
1583        /// Append a new `BidirectionalTextOverride` element
1584        pub fn bidirectional_text_override<F>(&mut self, f: F) -> &mut Self
1585        where
1586            F: for<'a> FnOnce(
1587                &'a mut crate::generated::all::builders::BidirectionalTextOverrideBuilder,
1588            ) -> &'a mut crate::generated::all::builders::BidirectionalTextOverrideBuilder,
1589        {
1590            let ty: crate::generated::all::BidirectionalTextOverride = Default::default();
1591            let mut ty_builder = crate::generated::all::builders::BidirectionalTextOverrideBuilder::new(
1592                ty,
1593            );
1594            (f)(&mut ty_builder);
1595            let ty = ty_builder.build();
1596            self.element.children_mut().push(ty.into());
1597            self
1598        }
1599        /// Append a new `Bold` element
1600        pub fn bold<F>(&mut self, f: F) -> &mut Self
1601        where
1602            F: for<'a> FnOnce(
1603                &'a mut crate::generated::all::builders::BoldBuilder,
1604            ) -> &'a mut crate::generated::all::builders::BoldBuilder,
1605        {
1606            let ty: crate::generated::all::Bold = Default::default();
1607            let mut ty_builder = crate::generated::all::builders::BoldBuilder::new(ty);
1608            (f)(&mut ty_builder);
1609            let ty = ty_builder.build();
1610            self.element.children_mut().push(ty.into());
1611            self
1612        }
1613        /// Append a new `Button` element
1614        pub fn button<F>(&mut self, f: F) -> &mut Self
1615        where
1616            F: for<'a> FnOnce(
1617                &'a mut crate::generated::all::builders::ButtonBuilder,
1618            ) -> &'a mut crate::generated::all::builders::ButtonBuilder,
1619        {
1620            let ty: crate::generated::all::Button = Default::default();
1621            let mut ty_builder = crate::generated::all::builders::ButtonBuilder::new(ty);
1622            (f)(&mut ty_builder);
1623            let ty = ty_builder.build();
1624            self.element.children_mut().push(ty.into());
1625            self
1626        }
1627        /// Append a new `Canvas` element
1628        pub fn canvas<F>(&mut self, f: F) -> &mut Self
1629        where
1630            F: for<'a> FnOnce(
1631                &'a mut crate::generated::all::builders::CanvasBuilder,
1632            ) -> &'a mut crate::generated::all::builders::CanvasBuilder,
1633        {
1634            let ty: crate::generated::all::Canvas = Default::default();
1635            let mut ty_builder = crate::generated::all::builders::CanvasBuilder::new(ty);
1636            (f)(&mut ty_builder);
1637            let ty = ty_builder.build();
1638            self.element.children_mut().push(ty.into());
1639            self
1640        }
1641        /// Append a new `Cite` element
1642        pub fn cite<F>(&mut self, f: F) -> &mut Self
1643        where
1644            F: for<'a> FnOnce(
1645                &'a mut crate::generated::all::builders::CiteBuilder,
1646            ) -> &'a mut crate::generated::all::builders::CiteBuilder,
1647        {
1648            let ty: crate::generated::all::Cite = Default::default();
1649            let mut ty_builder = crate::generated::all::builders::CiteBuilder::new(ty);
1650            (f)(&mut ty_builder);
1651            let ty = ty_builder.build();
1652            self.element.children_mut().push(ty.into());
1653            self
1654        }
1655        /// Append a new `Code` element
1656        pub fn code<F>(&mut self, f: F) -> &mut Self
1657        where
1658            F: for<'a> FnOnce(
1659                &'a mut crate::generated::all::builders::CodeBuilder,
1660            ) -> &'a mut crate::generated::all::builders::CodeBuilder,
1661        {
1662            let ty: crate::generated::all::Code = Default::default();
1663            let mut ty_builder = crate::generated::all::builders::CodeBuilder::new(ty);
1664            (f)(&mut ty_builder);
1665            let ty = ty_builder.build();
1666            self.element.children_mut().push(ty.into());
1667            self
1668        }
1669        /// Append a new `Data` element
1670        pub fn data_el<F>(&mut self, f: F) -> &mut Self
1671        where
1672            F: for<'a> FnOnce(
1673                &'a mut crate::generated::all::builders::DataBuilder,
1674            ) -> &'a mut crate::generated::all::builders::DataBuilder,
1675        {
1676            let ty: crate::generated::all::Data = Default::default();
1677            let mut ty_builder = crate::generated::all::builders::DataBuilder::new(ty);
1678            (f)(&mut ty_builder);
1679            let ty = ty_builder.build();
1680            self.element.children_mut().push(ty.into());
1681            self
1682        }
1683        /// Append a new `DataList` element
1684        pub fn data_list<F>(&mut self, f: F) -> &mut Self
1685        where
1686            F: for<'a> FnOnce(
1687                &'a mut crate::generated::all::builders::DataListBuilder,
1688            ) -> &'a mut crate::generated::all::builders::DataListBuilder,
1689        {
1690            let ty: crate::generated::all::DataList = Default::default();
1691            let mut ty_builder = crate::generated::all::builders::DataListBuilder::new(
1692                ty,
1693            );
1694            (f)(&mut ty_builder);
1695            let ty = ty_builder.build();
1696            self.element.children_mut().push(ty.into());
1697            self
1698        }
1699        /// Append a new `Definition` element
1700        pub fn definition<F>(&mut self, f: F) -> &mut Self
1701        where
1702            F: for<'a> FnOnce(
1703                &'a mut crate::generated::all::builders::DefinitionBuilder,
1704            ) -> &'a mut crate::generated::all::builders::DefinitionBuilder,
1705        {
1706            let ty: crate::generated::all::Definition = Default::default();
1707            let mut ty_builder = crate::generated::all::builders::DefinitionBuilder::new(
1708                ty,
1709            );
1710            (f)(&mut ty_builder);
1711            let ty = ty_builder.build();
1712            self.element.children_mut().push(ty.into());
1713            self
1714        }
1715        /// Append a new `DeletedText` element
1716        pub fn deleted_text<F>(&mut self, f: F) -> &mut Self
1717        where
1718            F: for<'a> FnOnce(
1719                &'a mut crate::generated::all::builders::DeletedTextBuilder,
1720            ) -> &'a mut crate::generated::all::builders::DeletedTextBuilder,
1721        {
1722            let ty: crate::generated::all::DeletedText = Default::default();
1723            let mut ty_builder = crate::generated::all::builders::DeletedTextBuilder::new(
1724                ty,
1725            );
1726            (f)(&mut ty_builder);
1727            let ty = ty_builder.build();
1728            self.element.children_mut().push(ty.into());
1729            self
1730        }
1731        /// Append a new `Embed` element
1732        pub fn embed<F>(&mut self, f: F) -> &mut Self
1733        where
1734            F: for<'a> FnOnce(
1735                &'a mut crate::generated::all::builders::EmbedBuilder,
1736            ) -> &'a mut crate::generated::all::builders::EmbedBuilder,
1737        {
1738            let ty: crate::generated::all::Embed = Default::default();
1739            let mut ty_builder = crate::generated::all::builders::EmbedBuilder::new(ty);
1740            (f)(&mut ty_builder);
1741            let ty = ty_builder.build();
1742            self.element.children_mut().push(ty.into());
1743            self
1744        }
1745        /// Append a new `Emphasis` element
1746        pub fn emphasis<F>(&mut self, f: F) -> &mut Self
1747        where
1748            F: for<'a> FnOnce(
1749                &'a mut crate::generated::all::builders::EmphasisBuilder,
1750            ) -> &'a mut crate::generated::all::builders::EmphasisBuilder,
1751        {
1752            let ty: crate::generated::all::Emphasis = Default::default();
1753            let mut ty_builder = crate::generated::all::builders::EmphasisBuilder::new(
1754                ty,
1755            );
1756            (f)(&mut ty_builder);
1757            let ty = ty_builder.build();
1758            self.element.children_mut().push(ty.into());
1759            self
1760        }
1761        /// Append a new `Iframe` element
1762        pub fn iframe<F>(&mut self, f: F) -> &mut Self
1763        where
1764            F: for<'a> FnOnce(
1765                &'a mut crate::generated::all::builders::IframeBuilder,
1766            ) -> &'a mut crate::generated::all::builders::IframeBuilder,
1767        {
1768            let ty: crate::generated::all::Iframe = Default::default();
1769            let mut ty_builder = crate::generated::all::builders::IframeBuilder::new(ty);
1770            (f)(&mut ty_builder);
1771            let ty = ty_builder.build();
1772            self.element.children_mut().push(ty.into());
1773            self
1774        }
1775        /// Append a new `Image` element
1776        pub fn image<F>(&mut self, f: F) -> &mut Self
1777        where
1778            F: for<'a> FnOnce(
1779                &'a mut crate::generated::all::builders::ImageBuilder,
1780            ) -> &'a mut crate::generated::all::builders::ImageBuilder,
1781        {
1782            let ty: crate::generated::all::Image = Default::default();
1783            let mut ty_builder = crate::generated::all::builders::ImageBuilder::new(ty);
1784            (f)(&mut ty_builder);
1785            let ty = ty_builder.build();
1786            self.element.children_mut().push(ty.into());
1787            self
1788        }
1789        /// Append a new `ImageMap` element
1790        pub fn image_map<F>(&mut self, f: F) -> &mut Self
1791        where
1792            F: for<'a> FnOnce(
1793                &'a mut crate::generated::all::builders::ImageMapBuilder,
1794            ) -> &'a mut crate::generated::all::builders::ImageMapBuilder,
1795        {
1796            let ty: crate::generated::all::ImageMap = Default::default();
1797            let mut ty_builder = crate::generated::all::builders::ImageMapBuilder::new(
1798                ty,
1799            );
1800            (f)(&mut ty_builder);
1801            let ty = ty_builder.build();
1802            self.element.children_mut().push(ty.into());
1803            self
1804        }
1805        /// Append a new `ImageMapArea` element
1806        pub fn image_map_area<F>(&mut self, f: F) -> &mut Self
1807        where
1808            F: for<'a> FnOnce(
1809                &'a mut crate::generated::all::builders::ImageMapAreaBuilder,
1810            ) -> &'a mut crate::generated::all::builders::ImageMapAreaBuilder,
1811        {
1812            let ty: crate::generated::all::ImageMapArea = Default::default();
1813            let mut ty_builder = crate::generated::all::builders::ImageMapAreaBuilder::new(
1814                ty,
1815            );
1816            (f)(&mut ty_builder);
1817            let ty = ty_builder.build();
1818            self.element.children_mut().push(ty.into());
1819            self
1820        }
1821        /// Append a new `Input` element
1822        pub fn input<F>(&mut self, f: F) -> &mut Self
1823        where
1824            F: for<'a> FnOnce(
1825                &'a mut crate::generated::all::builders::InputBuilder,
1826            ) -> &'a mut crate::generated::all::builders::InputBuilder,
1827        {
1828            let ty: crate::generated::all::Input = Default::default();
1829            let mut ty_builder = crate::generated::all::builders::InputBuilder::new(ty);
1830            (f)(&mut ty_builder);
1831            let ty = ty_builder.build();
1832            self.element.children_mut().push(ty.into());
1833            self
1834        }
1835        /// Append a new `InsertedText` element
1836        pub fn inserted_text<F>(&mut self, f: F) -> &mut Self
1837        where
1838            F: for<'a> FnOnce(
1839                &'a mut crate::generated::all::builders::InsertedTextBuilder,
1840            ) -> &'a mut crate::generated::all::builders::InsertedTextBuilder,
1841        {
1842            let ty: crate::generated::all::InsertedText = Default::default();
1843            let mut ty_builder = crate::generated::all::builders::InsertedTextBuilder::new(
1844                ty,
1845            );
1846            (f)(&mut ty_builder);
1847            let ty = ty_builder.build();
1848            self.element.children_mut().push(ty.into());
1849            self
1850        }
1851        /// Append a new `Italic` element
1852        pub fn italic<F>(&mut self, f: F) -> &mut Self
1853        where
1854            F: for<'a> FnOnce(
1855                &'a mut crate::generated::all::builders::ItalicBuilder,
1856            ) -> &'a mut crate::generated::all::builders::ItalicBuilder,
1857        {
1858            let ty: crate::generated::all::Italic = Default::default();
1859            let mut ty_builder = crate::generated::all::builders::ItalicBuilder::new(ty);
1860            (f)(&mut ty_builder);
1861            let ty = ty_builder.build();
1862            self.element.children_mut().push(ty.into());
1863            self
1864        }
1865        /// Append a new `KeyboardInput` element
1866        pub fn keyboard_input<F>(&mut self, f: F) -> &mut Self
1867        where
1868            F: for<'a> FnOnce(
1869                &'a mut crate::generated::all::builders::KeyboardInputBuilder,
1870            ) -> &'a mut crate::generated::all::builders::KeyboardInputBuilder,
1871        {
1872            let ty: crate::generated::all::KeyboardInput = Default::default();
1873            let mut ty_builder = crate::generated::all::builders::KeyboardInputBuilder::new(
1874                ty,
1875            );
1876            (f)(&mut ty_builder);
1877            let ty = ty_builder.build();
1878            self.element.children_mut().push(ty.into());
1879            self
1880        }
1881        /// Append a new `Label` element
1882        pub fn label<F>(&mut self, f: F) -> &mut Self
1883        where
1884            F: for<'a> FnOnce(
1885                &'a mut crate::generated::all::builders::LabelBuilder,
1886            ) -> &'a mut crate::generated::all::builders::LabelBuilder,
1887        {
1888            let ty: crate::generated::all::Label = Default::default();
1889            let mut ty_builder = crate::generated::all::builders::LabelBuilder::new(ty);
1890            (f)(&mut ty_builder);
1891            let ty = ty_builder.build();
1892            self.element.children_mut().push(ty.into());
1893            self
1894        }
1895        /// Append a new `LineBreak` element
1896        pub fn line_break<F>(&mut self, f: F) -> &mut Self
1897        where
1898            F: for<'a> FnOnce(
1899                &'a mut crate::generated::all::builders::LineBreakBuilder,
1900            ) -> &'a mut crate::generated::all::builders::LineBreakBuilder,
1901        {
1902            let ty: crate::generated::all::LineBreak = Default::default();
1903            let mut ty_builder = crate::generated::all::builders::LineBreakBuilder::new(
1904                ty,
1905            );
1906            (f)(&mut ty_builder);
1907            let ty = ty_builder.build();
1908            self.element.children_mut().push(ty.into());
1909            self
1910        }
1911        /// Append a new `LineBreakOpportunity` element
1912        pub fn line_break_opportunity<F>(&mut self, f: F) -> &mut Self
1913        where
1914            F: for<'a> FnOnce(
1915                &'a mut crate::generated::all::builders::LineBreakOpportunityBuilder,
1916            ) -> &'a mut crate::generated::all::builders::LineBreakOpportunityBuilder,
1917        {
1918            let ty: crate::generated::all::LineBreakOpportunity = Default::default();
1919            let mut ty_builder = crate::generated::all::builders::LineBreakOpportunityBuilder::new(
1920                ty,
1921            );
1922            (f)(&mut ty_builder);
1923            let ty = ty_builder.build();
1924            self.element.children_mut().push(ty.into());
1925            self
1926        }
1927        /// Append a new `Link` element
1928        pub fn link<F>(&mut self, f: F) -> &mut Self
1929        where
1930            F: for<'a> FnOnce(
1931                &'a mut crate::generated::all::builders::LinkBuilder,
1932            ) -> &'a mut crate::generated::all::builders::LinkBuilder,
1933        {
1934            let ty: crate::generated::all::Link = Default::default();
1935            let mut ty_builder = crate::generated::all::builders::LinkBuilder::new(ty);
1936            (f)(&mut ty_builder);
1937            let ty = ty_builder.build();
1938            self.element.children_mut().push(ty.into());
1939            self
1940        }
1941        /// Append a new `MarkText` element
1942        pub fn mark_text<F>(&mut self, f: F) -> &mut Self
1943        where
1944            F: for<'a> FnOnce(
1945                &'a mut crate::generated::all::builders::MarkTextBuilder,
1946            ) -> &'a mut crate::generated::all::builders::MarkTextBuilder,
1947        {
1948            let ty: crate::generated::all::MarkText = Default::default();
1949            let mut ty_builder = crate::generated::all::builders::MarkTextBuilder::new(
1950                ty,
1951            );
1952            (f)(&mut ty_builder);
1953            let ty = ty_builder.build();
1954            self.element.children_mut().push(ty.into());
1955            self
1956        }
1957        /// Append a new `Meta` element
1958        pub fn meta<F>(&mut self, f: F) -> &mut Self
1959        where
1960            F: for<'a> FnOnce(
1961                &'a mut crate::generated::all::builders::MetaBuilder,
1962            ) -> &'a mut crate::generated::all::builders::MetaBuilder,
1963        {
1964            let ty: crate::generated::all::Meta = Default::default();
1965            let mut ty_builder = crate::generated::all::builders::MetaBuilder::new(ty);
1966            (f)(&mut ty_builder);
1967            let ty = ty_builder.build();
1968            self.element.children_mut().push(ty.into());
1969            self
1970        }
1971        /// Append a new `Meter` element
1972        pub fn meter<F>(&mut self, f: F) -> &mut Self
1973        where
1974            F: for<'a> FnOnce(
1975                &'a mut crate::generated::all::builders::MeterBuilder,
1976            ) -> &'a mut crate::generated::all::builders::MeterBuilder,
1977        {
1978            let ty: crate::generated::all::Meter = Default::default();
1979            let mut ty_builder = crate::generated::all::builders::MeterBuilder::new(ty);
1980            (f)(&mut ty_builder);
1981            let ty = ty_builder.build();
1982            self.element.children_mut().push(ty.into());
1983            self
1984        }
1985        /// Append a new `NoScript` element
1986        pub fn no_script<F>(&mut self, f: F) -> &mut Self
1987        where
1988            F: for<'a> FnOnce(
1989                &'a mut crate::generated::all::builders::NoScriptBuilder,
1990            ) -> &'a mut crate::generated::all::builders::NoScriptBuilder,
1991        {
1992            let ty: crate::generated::all::NoScript = Default::default();
1993            let mut ty_builder = crate::generated::all::builders::NoScriptBuilder::new(
1994                ty,
1995            );
1996            (f)(&mut ty_builder);
1997            let ty = ty_builder.build();
1998            self.element.children_mut().push(ty.into());
1999            self
2000        }
2001        /// Append a new `Object` element
2002        pub fn object<F>(&mut self, f: F) -> &mut Self
2003        where
2004            F: for<'a> FnOnce(
2005                &'a mut crate::generated::all::builders::ObjectBuilder,
2006            ) -> &'a mut crate::generated::all::builders::ObjectBuilder,
2007        {
2008            let ty: crate::generated::all::Object = Default::default();
2009            let mut ty_builder = crate::generated::all::builders::ObjectBuilder::new(ty);
2010            (f)(&mut ty_builder);
2011            let ty = ty_builder.build();
2012            self.element.children_mut().push(ty.into());
2013            self
2014        }
2015        /// Append a new `Output` element
2016        pub fn output<F>(&mut self, f: F) -> &mut Self
2017        where
2018            F: for<'a> FnOnce(
2019                &'a mut crate::generated::all::builders::OutputBuilder,
2020            ) -> &'a mut crate::generated::all::builders::OutputBuilder,
2021        {
2022            let ty: crate::generated::all::Output = Default::default();
2023            let mut ty_builder = crate::generated::all::builders::OutputBuilder::new(ty);
2024            (f)(&mut ty_builder);
2025            let ty = ty_builder.build();
2026            self.element.children_mut().push(ty.into());
2027            self
2028        }
2029        /// Append a new `Picture` element
2030        pub fn picture<F>(&mut self, f: F) -> &mut Self
2031        where
2032            F: for<'a> FnOnce(
2033                &'a mut crate::generated::all::builders::PictureBuilder,
2034            ) -> &'a mut crate::generated::all::builders::PictureBuilder,
2035        {
2036            let ty: crate::generated::all::Picture = Default::default();
2037            let mut ty_builder = crate::generated::all::builders::PictureBuilder::new(
2038                ty,
2039            );
2040            (f)(&mut ty_builder);
2041            let ty = ty_builder.build();
2042            self.element.children_mut().push(ty.into());
2043            self
2044        }
2045        /// Append a new `Progress` element
2046        pub fn progress<F>(&mut self, f: F) -> &mut Self
2047        where
2048            F: for<'a> FnOnce(
2049                &'a mut crate::generated::all::builders::ProgressBuilder,
2050            ) -> &'a mut crate::generated::all::builders::ProgressBuilder,
2051        {
2052            let ty: crate::generated::all::Progress = Default::default();
2053            let mut ty_builder = crate::generated::all::builders::ProgressBuilder::new(
2054                ty,
2055            );
2056            (f)(&mut ty_builder);
2057            let ty = ty_builder.build();
2058            self.element.children_mut().push(ty.into());
2059            self
2060        }
2061        /// Append a new `Quotation` element
2062        pub fn quotation<F>(&mut self, f: F) -> &mut Self
2063        where
2064            F: for<'a> FnOnce(
2065                &'a mut crate::generated::all::builders::QuotationBuilder,
2066            ) -> &'a mut crate::generated::all::builders::QuotationBuilder,
2067        {
2068            let ty: crate::generated::all::Quotation = Default::default();
2069            let mut ty_builder = crate::generated::all::builders::QuotationBuilder::new(
2070                ty,
2071            );
2072            (f)(&mut ty_builder);
2073            let ty = ty_builder.build();
2074            self.element.children_mut().push(ty.into());
2075            self
2076        }
2077        /// Append a new `RubyAnnotation` element
2078        pub fn ruby_annotation<F>(&mut self, f: F) -> &mut Self
2079        where
2080            F: for<'a> FnOnce(
2081                &'a mut crate::generated::all::builders::RubyAnnotationBuilder,
2082            ) -> &'a mut crate::generated::all::builders::RubyAnnotationBuilder,
2083        {
2084            let ty: crate::generated::all::RubyAnnotation = Default::default();
2085            let mut ty_builder = crate::generated::all::builders::RubyAnnotationBuilder::new(
2086                ty,
2087            );
2088            (f)(&mut ty_builder);
2089            let ty = ty_builder.build();
2090            self.element.children_mut().push(ty.into());
2091            self
2092        }
2093        /// Append a new `SampleOutput` element
2094        pub fn sample_output<F>(&mut self, f: F) -> &mut Self
2095        where
2096            F: for<'a> FnOnce(
2097                &'a mut crate::generated::all::builders::SampleOutputBuilder,
2098            ) -> &'a mut crate::generated::all::builders::SampleOutputBuilder,
2099        {
2100            let ty: crate::generated::all::SampleOutput = Default::default();
2101            let mut ty_builder = crate::generated::all::builders::SampleOutputBuilder::new(
2102                ty,
2103            );
2104            (f)(&mut ty_builder);
2105            let ty = ty_builder.build();
2106            self.element.children_mut().push(ty.into());
2107            self
2108        }
2109        /// Append a new `Script` element
2110        pub fn script<F>(&mut self, f: F) -> &mut Self
2111        where
2112            F: for<'a> FnOnce(
2113                &'a mut crate::generated::all::builders::ScriptBuilder,
2114            ) -> &'a mut crate::generated::all::builders::ScriptBuilder,
2115        {
2116            let ty: crate::generated::all::Script = Default::default();
2117            let mut ty_builder = crate::generated::all::builders::ScriptBuilder::new(ty);
2118            (f)(&mut ty_builder);
2119            let ty = ty_builder.build();
2120            self.element.children_mut().push(ty.into());
2121            self
2122        }
2123        /// Append a new `Select` element
2124        pub fn select<F>(&mut self, f: F) -> &mut Self
2125        where
2126            F: for<'a> FnOnce(
2127                &'a mut crate::generated::all::builders::SelectBuilder,
2128            ) -> &'a mut crate::generated::all::builders::SelectBuilder,
2129        {
2130            let ty: crate::generated::all::Select = Default::default();
2131            let mut ty_builder = crate::generated::all::builders::SelectBuilder::new(ty);
2132            (f)(&mut ty_builder);
2133            let ty = ty_builder.build();
2134            self.element.children_mut().push(ty.into());
2135            self
2136        }
2137        /// Append a new `SideComment` element
2138        pub fn side_comment<F>(&mut self, f: F) -> &mut Self
2139        where
2140            F: for<'a> FnOnce(
2141                &'a mut crate::generated::all::builders::SideCommentBuilder,
2142            ) -> &'a mut crate::generated::all::builders::SideCommentBuilder,
2143        {
2144            let ty: crate::generated::all::SideComment = Default::default();
2145            let mut ty_builder = crate::generated::all::builders::SideCommentBuilder::new(
2146                ty,
2147            );
2148            (f)(&mut ty_builder);
2149            let ty = ty_builder.build();
2150            self.element.children_mut().push(ty.into());
2151            self
2152        }
2153        /// Append a new `Slot` element
2154        pub fn slot<F>(&mut self, f: F) -> &mut Self
2155        where
2156            F: for<'a> FnOnce(
2157                &'a mut crate::generated::all::builders::SlotBuilder,
2158            ) -> &'a mut crate::generated::all::builders::SlotBuilder,
2159        {
2160            let ty: crate::generated::all::Slot = Default::default();
2161            let mut ty_builder = crate::generated::all::builders::SlotBuilder::new(ty);
2162            (f)(&mut ty_builder);
2163            let ty = ty_builder.build();
2164            self.element.children_mut().push(ty.into());
2165            self
2166        }
2167        /// Append a new `Span` element
2168        pub fn span<F>(&mut self, f: F) -> &mut Self
2169        where
2170            F: for<'a> FnOnce(
2171                &'a mut crate::generated::all::builders::SpanBuilder,
2172            ) -> &'a mut crate::generated::all::builders::SpanBuilder,
2173        {
2174            let ty: crate::generated::all::Span = Default::default();
2175            let mut ty_builder = crate::generated::all::builders::SpanBuilder::new(ty);
2176            (f)(&mut ty_builder);
2177            let ty = ty_builder.build();
2178            self.element.children_mut().push(ty.into());
2179            self
2180        }
2181        /// Append a new `StrikeThrough` element
2182        pub fn strike_through<F>(&mut self, f: F) -> &mut Self
2183        where
2184            F: for<'a> FnOnce(
2185                &'a mut crate::generated::all::builders::StrikeThroughBuilder,
2186            ) -> &'a mut crate::generated::all::builders::StrikeThroughBuilder,
2187        {
2188            let ty: crate::generated::all::StrikeThrough = Default::default();
2189            let mut ty_builder = crate::generated::all::builders::StrikeThroughBuilder::new(
2190                ty,
2191            );
2192            (f)(&mut ty_builder);
2193            let ty = ty_builder.build();
2194            self.element.children_mut().push(ty.into());
2195            self
2196        }
2197        /// Append a new `Strong` element
2198        pub fn strong<F>(&mut self, f: F) -> &mut Self
2199        where
2200            F: for<'a> FnOnce(
2201                &'a mut crate::generated::all::builders::StrongBuilder,
2202            ) -> &'a mut crate::generated::all::builders::StrongBuilder,
2203        {
2204            let ty: crate::generated::all::Strong = Default::default();
2205            let mut ty_builder = crate::generated::all::builders::StrongBuilder::new(ty);
2206            (f)(&mut ty_builder);
2207            let ty = ty_builder.build();
2208            self.element.children_mut().push(ty.into());
2209            self
2210        }
2211        /// Append a new `SubScript` element
2212        pub fn sub_script<F>(&mut self, f: F) -> &mut Self
2213        where
2214            F: for<'a> FnOnce(
2215                &'a mut crate::generated::all::builders::SubScriptBuilder,
2216            ) -> &'a mut crate::generated::all::builders::SubScriptBuilder,
2217        {
2218            let ty: crate::generated::all::SubScript = Default::default();
2219            let mut ty_builder = crate::generated::all::builders::SubScriptBuilder::new(
2220                ty,
2221            );
2222            (f)(&mut ty_builder);
2223            let ty = ty_builder.build();
2224            self.element.children_mut().push(ty.into());
2225            self
2226        }
2227        /// Append a new `SuperScript` element
2228        pub fn super_script<F>(&mut self, f: F) -> &mut Self
2229        where
2230            F: for<'a> FnOnce(
2231                &'a mut crate::generated::all::builders::SuperScriptBuilder,
2232            ) -> &'a mut crate::generated::all::builders::SuperScriptBuilder,
2233        {
2234            let ty: crate::generated::all::SuperScript = Default::default();
2235            let mut ty_builder = crate::generated::all::builders::SuperScriptBuilder::new(
2236                ty,
2237            );
2238            (f)(&mut ty_builder);
2239            let ty = ty_builder.build();
2240            self.element.children_mut().push(ty.into());
2241            self
2242        }
2243        /// Append a new `Template` element
2244        pub fn template<F>(&mut self, f: F) -> &mut Self
2245        where
2246            F: for<'a> FnOnce(
2247                &'a mut crate::generated::all::builders::TemplateBuilder,
2248            ) -> &'a mut crate::generated::all::builders::TemplateBuilder,
2249        {
2250            let ty: crate::generated::all::Template = Default::default();
2251            let mut ty_builder = crate::generated::all::builders::TemplateBuilder::new(
2252                ty,
2253            );
2254            (f)(&mut ty_builder);
2255            let ty = ty_builder.build();
2256            self.element.children_mut().push(ty.into());
2257            self
2258        }
2259        /// Append a new text element.
2260        pub fn text(
2261            &mut self,
2262            s: impl Into<std::borrow::Cow<'static, str>>,
2263        ) -> &mut Self {
2264            let cow = s.into();
2265            self.element.children_mut().push(cow.into());
2266            self
2267        }
2268        /// Append a new `TextArea` element
2269        pub fn text_area<F>(&mut self, f: F) -> &mut Self
2270        where
2271            F: for<'a> FnOnce(
2272                &'a mut crate::generated::all::builders::TextAreaBuilder,
2273            ) -> &'a mut crate::generated::all::builders::TextAreaBuilder,
2274        {
2275            let ty: crate::generated::all::TextArea = Default::default();
2276            let mut ty_builder = crate::generated::all::builders::TextAreaBuilder::new(
2277                ty,
2278            );
2279            (f)(&mut ty_builder);
2280            let ty = ty_builder.build();
2281            self.element.children_mut().push(ty.into());
2282            self
2283        }
2284        /// Append a new `Time` element
2285        pub fn time<F>(&mut self, f: F) -> &mut Self
2286        where
2287            F: for<'a> FnOnce(
2288                &'a mut crate::generated::all::builders::TimeBuilder,
2289            ) -> &'a mut crate::generated::all::builders::TimeBuilder,
2290        {
2291            let ty: crate::generated::all::Time = Default::default();
2292            let mut ty_builder = crate::generated::all::builders::TimeBuilder::new(ty);
2293            (f)(&mut ty_builder);
2294            let ty = ty_builder.build();
2295            self.element.children_mut().push(ty.into());
2296            self
2297        }
2298        /// Append a new `Underline` element
2299        pub fn underline<F>(&mut self, f: F) -> &mut Self
2300        where
2301            F: for<'a> FnOnce(
2302                &'a mut crate::generated::all::builders::UnderlineBuilder,
2303            ) -> &'a mut crate::generated::all::builders::UnderlineBuilder,
2304        {
2305            let ty: crate::generated::all::Underline = Default::default();
2306            let mut ty_builder = crate::generated::all::builders::UnderlineBuilder::new(
2307                ty,
2308            );
2309            (f)(&mut ty_builder);
2310            let ty = ty_builder.build();
2311            self.element.children_mut().push(ty.into());
2312            self
2313        }
2314        /// Append a new `Variable` element
2315        pub fn variable<F>(&mut self, f: F) -> &mut Self
2316        where
2317            F: for<'a> FnOnce(
2318                &'a mut crate::generated::all::builders::VariableBuilder,
2319            ) -> &'a mut crate::generated::all::builders::VariableBuilder,
2320        {
2321            let ty: crate::generated::all::Variable = Default::default();
2322            let mut ty_builder = crate::generated::all::builders::VariableBuilder::new(
2323                ty,
2324            );
2325            (f)(&mut ty_builder);
2326            let ty = ty_builder.build();
2327            self.element.children_mut().push(ty.into());
2328            self
2329        }
2330        /// Append a new `Video` element
2331        pub fn video<F>(&mut self, f: F) -> &mut Self
2332        where
2333            F: for<'a> FnOnce(
2334                &'a mut crate::generated::all::builders::VideoBuilder,
2335            ) -> &'a mut crate::generated::all::builders::VideoBuilder,
2336        {
2337            let ty: crate::generated::all::Video = Default::default();
2338            let mut ty_builder = crate::generated::all::builders::VideoBuilder::new(ty);
2339            (f)(&mut ty_builder);
2340            let ty = ty_builder.build();
2341            self.element.children_mut().push(ty.into());
2342            self
2343        }
2344        /// Set the value of the `disabled` attribute
2345        pub fn disabled(&mut self, value: bool) -> &mut Self {
2346            self.element.set_disabled(value);
2347            self
2348        }
2349        /// Set the value of the `form` attribute
2350        pub fn form(
2351            &mut self,
2352            value: impl Into<std::borrow::Cow<'static, str>>,
2353        ) -> &mut Self {
2354            self.element.set_form(Some(value.into()));
2355            self
2356        }
2357        /// Set the value of the `formaction` attribute
2358        pub fn form_action(
2359            &mut self,
2360            value: impl Into<std::borrow::Cow<'static, str>>,
2361        ) -> &mut Self {
2362            self.element.set_form_action(Some(value.into()));
2363            self
2364        }
2365        /// Set the value of the `formenctype` attribute
2366        pub fn form_enctype(
2367            &mut self,
2368            value: impl Into<std::borrow::Cow<'static, str>>,
2369        ) -> &mut Self {
2370            self.element.set_form_enctype(Some(value.into()));
2371            self
2372        }
2373        /// Set the value of the `formmethod` attribute
2374        pub fn form_method(
2375            &mut self,
2376            value: impl Into<std::borrow::Cow<'static, str>>,
2377        ) -> &mut Self {
2378            self.element.set_form_method(Some(value.into()));
2379            self
2380        }
2381        /// Set the value of the `formnovalidate` attribute
2382        pub fn form_no_validate(&mut self, value: bool) -> &mut Self {
2383            self.element.set_form_no_validate(value);
2384            self
2385        }
2386        /// Set the value of the `formtarget` attribute
2387        pub fn form_target(
2388            &mut self,
2389            value: impl Into<std::borrow::Cow<'static, str>>,
2390        ) -> &mut Self {
2391            self.element.set_form_target(Some(value.into()));
2392            self
2393        }
2394        /// Set the value of the `name` attribute
2395        pub fn name(
2396            &mut self,
2397            value: impl Into<std::borrow::Cow<'static, str>>,
2398        ) -> &mut Self {
2399            self.element.set_name(Some(value.into()));
2400            self
2401        }
2402        /// Set the value of the `popovertarget` attribute
2403        pub fn popovertarget(
2404            &mut self,
2405            value: impl Into<std::borrow::Cow<'static, str>>,
2406        ) -> &mut Self {
2407            self.element.set_popovertarget(Some(value.into()));
2408            self
2409        }
2410        /// Set the value of the `popovertargetaction` attribute
2411        pub fn popovertargetaction(
2412            &mut self,
2413            value: impl Into<std::borrow::Cow<'static, str>>,
2414        ) -> &mut Self {
2415            self.element.set_popovertargetaction(Some(value.into()));
2416            self
2417        }
2418        /// Set the value of the `type` attribute
2419        pub fn type_(
2420            &mut self,
2421            value: impl Into<std::borrow::Cow<'static, str>>,
2422        ) -> &mut Self {
2423            self.element.set_type_(Some(value.into()));
2424            self
2425        }
2426        /// Set the value of the `value` attribute
2427        pub fn value(
2428            &mut self,
2429            value: impl Into<std::borrow::Cow<'static, str>>,
2430        ) -> &mut Self {
2431            self.element.set_value(Some(value.into()));
2432            self
2433        }
2434        /// Set the value of the `role` attribute
2435        pub fn role(
2436            &mut self,
2437            value: impl Into<std::borrow::Cow<'static, str>>,
2438        ) -> &mut Self {
2439            self.element.set_role(Some(value.into()));
2440            self
2441        }
2442        /// Set the value of the `aria-activedescendant` attribute
2443        pub fn aria_active_descendant_element(
2444            &mut self,
2445            value: impl Into<std::borrow::Cow<'static, str>>,
2446        ) -> &mut Self {
2447            self.element.set_aria_active_descendant_element(Some(value.into()));
2448            self
2449        }
2450        /// Set the value of the `aria-atomic` attribute
2451        pub fn aria_atomic(&mut self, value: bool) -> &mut Self {
2452            self.element.set_aria_atomic(value);
2453            self
2454        }
2455        /// Set the value of the `aria-autocomplete` attribute
2456        pub fn aria_auto_complete(
2457            &mut self,
2458            value: impl Into<std::borrow::Cow<'static, str>>,
2459        ) -> &mut Self {
2460            self.element.set_aria_auto_complete(Some(value.into()));
2461            self
2462        }
2463        /// Set the value of the `aria-braillelabel` attribute
2464        pub fn aria_braille_label(
2465            &mut self,
2466            value: impl Into<std::borrow::Cow<'static, str>>,
2467        ) -> &mut Self {
2468            self.element.set_aria_braille_label(Some(value.into()));
2469            self
2470        }
2471        /// Set the value of the `aria-brailleroledescription` attribute
2472        pub fn aria_braille_role_description(
2473            &mut self,
2474            value: impl Into<std::borrow::Cow<'static, str>>,
2475        ) -> &mut Self {
2476            self.element.set_aria_braille_role_description(Some(value.into()));
2477            self
2478        }
2479        /// Set the value of the `aria-busy` attribute
2480        pub fn aria_busy(&mut self, value: bool) -> &mut Self {
2481            self.element.set_aria_busy(value);
2482            self
2483        }
2484        /// Set the value of the `aria-checked` attribute
2485        pub fn aria_checked(
2486            &mut self,
2487            value: impl Into<std::borrow::Cow<'static, str>>,
2488        ) -> &mut Self {
2489            self.element.set_aria_checked(Some(value.into()));
2490            self
2491        }
2492        /// Set the value of the `aria-colindex` attribute
2493        pub fn aria_col_index(&mut self, value: i64) -> &mut Self {
2494            self.element.set_aria_col_index(Some(value));
2495            self
2496        }
2497        /// Set the value of the `aria-colindextext` attribute
2498        pub fn aria_col_index_text(
2499            &mut self,
2500            value: impl Into<std::borrow::Cow<'static, str>>,
2501        ) -> &mut Self {
2502            self.element.set_aria_col_index_text(Some(value.into()));
2503            self
2504        }
2505        /// Set the value of the `aria-colspan` attribute
2506        pub fn aria_col_span(&mut self, value: i64) -> &mut Self {
2507            self.element.set_aria_col_span(Some(value));
2508            self
2509        }
2510        /// Set the value of the `aria-controls` attribute
2511        pub fn aria_controls_elements(
2512            &mut self,
2513            value: impl Into<std::borrow::Cow<'static, str>>,
2514        ) -> &mut Self {
2515            self.element.set_aria_controls_elements(Some(value.into()));
2516            self
2517        }
2518        /// Set the value of the `aria-current` attribute
2519        pub fn aria_current(
2520            &mut self,
2521            value: impl Into<std::borrow::Cow<'static, str>>,
2522        ) -> &mut Self {
2523            self.element.set_aria_current(Some(value.into()));
2524            self
2525        }
2526        /// Set the value of the `aria-describedby` attribute
2527        pub fn aria_described_by_elements(
2528            &mut self,
2529            value: impl Into<std::borrow::Cow<'static, str>>,
2530        ) -> &mut Self {
2531            self.element.set_aria_described_by_elements(Some(value.into()));
2532            self
2533        }
2534        /// Set the value of the `aria-description` attribute
2535        pub fn aria_description(
2536            &mut self,
2537            value: impl Into<std::borrow::Cow<'static, str>>,
2538        ) -> &mut Self {
2539            self.element.set_aria_description(Some(value.into()));
2540            self
2541        }
2542        /// Set the value of the `aria-details` attribute
2543        pub fn aria_details_elements(
2544            &mut self,
2545            value: impl Into<std::borrow::Cow<'static, str>>,
2546        ) -> &mut Self {
2547            self.element.set_aria_details_elements(Some(value.into()));
2548            self
2549        }
2550        /// Set the value of the `aria-disabled` attribute
2551        pub fn aria_disabled(&mut self, value: bool) -> &mut Self {
2552            self.element.set_aria_disabled(value);
2553            self
2554        }
2555        /// Set the value of the `aria-dropeffect` attribute
2556        pub fn aria_drop_effect(
2557            &mut self,
2558            value: impl Into<std::borrow::Cow<'static, str>>,
2559        ) -> &mut Self {
2560            self.element.set_aria_drop_effect(Some(value.into()));
2561            self
2562        }
2563        /// Set the value of the `aria-errormessage` attribute
2564        pub fn aria_error_message_elements(
2565            &mut self,
2566            value: impl Into<std::borrow::Cow<'static, str>>,
2567        ) -> &mut Self {
2568            self.element.set_aria_error_message_elements(Some(value.into()));
2569            self
2570        }
2571        /// Set the value of the `aria-expanded` attribute
2572        pub fn aria_expanded(&mut self, value: bool) -> &mut Self {
2573            self.element.set_aria_expanded(value);
2574            self
2575        }
2576        /// Set the value of the `aria-flowto` attribute
2577        pub fn aria_flow_to_elements(
2578            &mut self,
2579            value: impl Into<std::borrow::Cow<'static, str>>,
2580        ) -> &mut Self {
2581            self.element.set_aria_flow_to_elements(Some(value.into()));
2582            self
2583        }
2584        /// Set the value of the `aria-grabbed` attribute
2585        pub fn aria_grabbed(&mut self, value: bool) -> &mut Self {
2586            self.element.set_aria_grabbed(value);
2587            self
2588        }
2589        /// Set the value of the `aria-haspopup` attribute
2590        pub fn aria_has_popup(
2591            &mut self,
2592            value: impl Into<std::borrow::Cow<'static, str>>,
2593        ) -> &mut Self {
2594            self.element.set_aria_has_popup(Some(value.into()));
2595            self
2596        }
2597        /// Set the value of the `aria-hidden` attribute
2598        pub fn aria_hidden(&mut self, value: bool) -> &mut Self {
2599            self.element.set_aria_hidden(value);
2600            self
2601        }
2602        /// Set the value of the `aria-invalid` attribute
2603        pub fn aria_invalid(
2604            &mut self,
2605            value: impl Into<std::borrow::Cow<'static, str>>,
2606        ) -> &mut Self {
2607            self.element.set_aria_invalid(Some(value.into()));
2608            self
2609        }
2610        /// Set the value of the `aria-keyshortcuts` attribute
2611        pub fn aria_key_shortcuts(
2612            &mut self,
2613            value: impl Into<std::borrow::Cow<'static, str>>,
2614        ) -> &mut Self {
2615            self.element.set_aria_key_shortcuts(Some(value.into()));
2616            self
2617        }
2618        /// Set the value of the `aria-label` attribute
2619        pub fn aria_label(
2620            &mut self,
2621            value: impl Into<std::borrow::Cow<'static, str>>,
2622        ) -> &mut Self {
2623            self.element.set_aria_label(Some(value.into()));
2624            self
2625        }
2626        /// Set the value of the `aria-labelledby` attribute
2627        pub fn aria_labelled_by_elements(
2628            &mut self,
2629            value: impl Into<std::borrow::Cow<'static, str>>,
2630        ) -> &mut Self {
2631            self.element.set_aria_labelled_by_elements(Some(value.into()));
2632            self
2633        }
2634        /// Set the value of the `aria-level` attribute
2635        pub fn aria_level(&mut self, value: i64) -> &mut Self {
2636            self.element.set_aria_level(Some(value));
2637            self
2638        }
2639        /// Set the value of the `aria-live` attribute
2640        pub fn aria_live(
2641            &mut self,
2642            value: impl Into<std::borrow::Cow<'static, str>>,
2643        ) -> &mut Self {
2644            self.element.set_aria_live(Some(value.into()));
2645            self
2646        }
2647        /// Set the value of the `aria-orientation` attribute
2648        pub fn aria_orientation(
2649            &mut self,
2650            value: impl Into<std::borrow::Cow<'static, str>>,
2651        ) -> &mut Self {
2652            self.element.set_aria_orientation(Some(value.into()));
2653            self
2654        }
2655        /// Set the value of the `aria-owns` attribute
2656        pub fn aria_owns_elements(
2657            &mut self,
2658            value: impl Into<std::borrow::Cow<'static, str>>,
2659        ) -> &mut Self {
2660            self.element.set_aria_owns_elements(Some(value.into()));
2661            self
2662        }
2663        /// Set the value of the `aria-posinset` attribute
2664        pub fn aria_pos_in_set(&mut self, value: i64) -> &mut Self {
2665            self.element.set_aria_pos_in_set(Some(value));
2666            self
2667        }
2668        /// Set the value of the `aria-pressed` attribute
2669        pub fn aria_pressed(
2670            &mut self,
2671            value: impl Into<std::borrow::Cow<'static, str>>,
2672        ) -> &mut Self {
2673            self.element.set_aria_pressed(Some(value.into()));
2674            self
2675        }
2676        /// Set the value of the `aria-readonly` attribute
2677        pub fn aria_read_only(&mut self, value: bool) -> &mut Self {
2678            self.element.set_aria_read_only(value);
2679            self
2680        }
2681        /// Set the value of the `aria-relevant` attribute
2682        pub fn aria_relevant(
2683            &mut self,
2684            value: impl Into<std::borrow::Cow<'static, str>>,
2685        ) -> &mut Self {
2686            self.element.set_aria_relevant(Some(value.into()));
2687            self
2688        }
2689        /// Set the value of the `aria-required` attribute
2690        pub fn aria_required(&mut self, value: bool) -> &mut Self {
2691            self.element.set_aria_required(value);
2692            self
2693        }
2694        /// Set the value of the `aria-roledescription` attribute
2695        pub fn aria_role_description(
2696            &mut self,
2697            value: impl Into<std::borrow::Cow<'static, str>>,
2698        ) -> &mut Self {
2699            self.element.set_aria_role_description(Some(value.into()));
2700            self
2701        }
2702        /// Set the value of the `aria-rowindex` attribute
2703        pub fn aria_row_index(&mut self, value: i64) -> &mut Self {
2704            self.element.set_aria_row_index(Some(value));
2705            self
2706        }
2707        /// Set the value of the `aria-rowindextext` attribute
2708        pub fn aria_row_index_text(
2709            &mut self,
2710            value: impl Into<std::borrow::Cow<'static, str>>,
2711        ) -> &mut Self {
2712            self.element.set_aria_row_index_text(Some(value.into()));
2713            self
2714        }
2715        /// Set the value of the `aria-rowspan` attribute
2716        pub fn aria_row_span(&mut self, value: i64) -> &mut Self {
2717            self.element.set_aria_row_span(Some(value));
2718            self
2719        }
2720        /// Set the value of the `aria-selected` attribute
2721        pub fn aria_selected(&mut self, value: bool) -> &mut Self {
2722            self.element.set_aria_selected(value);
2723            self
2724        }
2725        /// Set the value of the `aria-setsize` attribute
2726        pub fn aria_set_size(&mut self, value: i64) -> &mut Self {
2727            self.element.set_aria_set_size(Some(value));
2728            self
2729        }
2730        /// Set the value of the `aria-valuemax` attribute
2731        pub fn aria_value_max(&mut self, value: f64) -> &mut Self {
2732            self.element.set_aria_value_max(Some(value));
2733            self
2734        }
2735        /// Set the value of the `aria-valuemin` attribute
2736        pub fn aria_value_min(&mut self, value: f64) -> &mut Self {
2737            self.element.set_aria_value_min(Some(value));
2738            self
2739        }
2740        /// Set the value of the `aria-valuetext` attribute
2741        pub fn aria_value_text(
2742            &mut self,
2743            value: impl Into<std::borrow::Cow<'static, str>>,
2744        ) -> &mut Self {
2745            self.element.set_aria_value_text(Some(value.into()));
2746            self
2747        }
2748        /// Set the value of the `accesskey` attribute
2749        pub fn access_key(
2750            &mut self,
2751            value: impl Into<std::borrow::Cow<'static, str>>,
2752        ) -> &mut Self {
2753            self.element.set_access_key(Some(value.into()));
2754            self
2755        }
2756        /// Set the value of the `autocapitalize` attribute
2757        pub fn auto_capitalize(
2758            &mut self,
2759            value: impl Into<std::borrow::Cow<'static, str>>,
2760        ) -> &mut Self {
2761            self.element.set_auto_capitalize(Some(value.into()));
2762            self
2763        }
2764        /// Set the value of the `autofocus` attribute
2765        pub fn autofocus(&mut self, value: bool) -> &mut Self {
2766            self.element.set_autofocus(value);
2767            self
2768        }
2769        /// Set the value of the `class` attribute
2770        pub fn class(
2771            &mut self,
2772            value: impl Into<std::borrow::Cow<'static, str>>,
2773        ) -> &mut Self {
2774            self.element.set_class(Some(value.into()));
2775            self
2776        }
2777        /// Set the value of the `contenteditable` attribute
2778        pub fn content_editable(
2779            &mut self,
2780            value: impl Into<std::borrow::Cow<'static, str>>,
2781        ) -> &mut Self {
2782            self.element.set_content_editable(Some(value.into()));
2783            self
2784        }
2785        /// Set the value of the `dir` attribute
2786        pub fn direction(
2787            &mut self,
2788            value: impl Into<std::borrow::Cow<'static, str>>,
2789        ) -> &mut Self {
2790            self.element.set_direction(Some(value.into()));
2791            self
2792        }
2793        /// Set the value of the `draggable` attribute
2794        pub fn draggable(&mut self, value: bool) -> &mut Self {
2795            self.element.set_draggable(value);
2796            self
2797        }
2798        /// Set the value of the `enterkeyhint` attribute
2799        pub fn enter_key_hint(
2800            &mut self,
2801            value: impl Into<std::borrow::Cow<'static, str>>,
2802        ) -> &mut Self {
2803            self.element.set_enter_key_hint(Some(value.into()));
2804            self
2805        }
2806        /// Set the value of the `exportparts` attribute
2807        pub fn export_parts(
2808            &mut self,
2809            value: impl Into<std::borrow::Cow<'static, str>>,
2810        ) -> &mut Self {
2811            self.element.set_export_parts(Some(value.into()));
2812            self
2813        }
2814        /// Set the value of the `hidden` attribute
2815        pub fn hidden(
2816            &mut self,
2817            value: impl Into<std::borrow::Cow<'static, str>>,
2818        ) -> &mut Self {
2819            self.element.set_hidden(Some(value.into()));
2820            self
2821        }
2822        /// Set the value of the `id` attribute
2823        pub fn id(
2824            &mut self,
2825            value: impl Into<std::borrow::Cow<'static, str>>,
2826        ) -> &mut Self {
2827            self.element.set_id(Some(value.into()));
2828            self
2829        }
2830        /// Set the value of the `inert` attribute
2831        pub fn inert(&mut self, value: bool) -> &mut Self {
2832            self.element.set_inert(value);
2833            self
2834        }
2835        /// Set the value of the `inputmode` attribute
2836        pub fn input_mode(
2837            &mut self,
2838            value: impl Into<std::borrow::Cow<'static, str>>,
2839        ) -> &mut Self {
2840            self.element.set_input_mode(Some(value.into()));
2841            self
2842        }
2843        /// Set the value of the `is` attribute
2844        pub fn is_(
2845            &mut self,
2846            value: impl Into<std::borrow::Cow<'static, str>>,
2847        ) -> &mut Self {
2848            self.element.set_is_(Some(value.into()));
2849            self
2850        }
2851        /// Set the value of the `itemid` attribute
2852        pub fn item_id(
2853            &mut self,
2854            value: impl Into<std::borrow::Cow<'static, str>>,
2855        ) -> &mut Self {
2856            self.element.set_item_id(Some(value.into()));
2857            self
2858        }
2859        /// Set the value of the `itemprop` attribute
2860        pub fn item_prop(
2861            &mut self,
2862            value: impl Into<std::borrow::Cow<'static, str>>,
2863        ) -> &mut Self {
2864            self.element.set_item_prop(Some(value.into()));
2865            self
2866        }
2867        /// Set the value of the `itemref` attribute
2868        pub fn item_ref(
2869            &mut self,
2870            value: impl Into<std::borrow::Cow<'static, str>>,
2871        ) -> &mut Self {
2872            self.element.set_item_ref(Some(value.into()));
2873            self
2874        }
2875        /// Set the value of the `itemscope` attribute
2876        pub fn item_scope(
2877            &mut self,
2878            value: impl Into<std::borrow::Cow<'static, str>>,
2879        ) -> &mut Self {
2880            self.element.set_item_scope(Some(value.into()));
2881            self
2882        }
2883        /// Set the value of the `itemtype` attribute
2884        pub fn item_type(
2885            &mut self,
2886            value: impl Into<std::borrow::Cow<'static, str>>,
2887        ) -> &mut Self {
2888            self.element.set_item_type(Some(value.into()));
2889            self
2890        }
2891        /// Set the value of the `lang` attribute
2892        pub fn lang(
2893            &mut self,
2894            value: impl Into<std::borrow::Cow<'static, str>>,
2895        ) -> &mut Self {
2896            self.element.set_lang(Some(value.into()));
2897            self
2898        }
2899        /// Set the value of the `nonce` attribute
2900        pub fn nonce(
2901            &mut self,
2902            value: impl Into<std::borrow::Cow<'static, str>>,
2903        ) -> &mut Self {
2904            self.element.set_nonce(Some(value.into()));
2905            self
2906        }
2907        /// Set the value of the `part` attribute
2908        pub fn part(
2909            &mut self,
2910            value: impl Into<std::borrow::Cow<'static, str>>,
2911        ) -> &mut Self {
2912            self.element.set_part(Some(value.into()));
2913            self
2914        }
2915        /// Set the value of the `slot` attribute
2916        pub fn slot_attr(
2917            &mut self,
2918            value: impl Into<std::borrow::Cow<'static, str>>,
2919        ) -> &mut Self {
2920            self.element.set_slot(Some(value.into()));
2921            self
2922        }
2923        /// Set the value of the `spellcheck` attribute
2924        pub fn spellcheck(
2925            &mut self,
2926            value: impl Into<std::borrow::Cow<'static, str>>,
2927        ) -> &mut Self {
2928            self.element.set_spellcheck(Some(value.into()));
2929            self
2930        }
2931        /// Set the value of the `style` attribute
2932        pub fn style(
2933            &mut self,
2934            value: impl Into<std::borrow::Cow<'static, str>>,
2935        ) -> &mut Self {
2936            self.element.set_style(Some(value.into()));
2937            self
2938        }
2939        /// Set the value of the `tabindex` attribute
2940        pub fn tab_index(&mut self, value: i64) -> &mut Self {
2941            self.element.set_tab_index(Some(value));
2942            self
2943        }
2944        /// Set the value of the `title` attribute
2945        pub fn title(
2946            &mut self,
2947            value: impl Into<std::borrow::Cow<'static, str>>,
2948        ) -> &mut Self {
2949            self.element.set_title(Some(value.into()));
2950            self
2951        }
2952        /// Set the value of the `translate` attribute
2953        pub fn translate(&mut self, value: bool) -> &mut Self {
2954            self.element.set_translate(value);
2955            self
2956        }
2957        /// Push a new child element to the list of children.
2958        pub fn push<T>(&mut self, child_el: T) -> &mut Self
2959        where
2960            T: Into<crate::generated::all::children::ButtonChild>,
2961        {
2962            let child_el = child_el.into();
2963            self.element.children_mut().push(child_el);
2964            self
2965        }
2966        /// Extend the list of children with an iterator of child elements.
2967        pub fn extend<I, T>(&mut self, iter: I) -> &mut Self
2968        where
2969            I: IntoIterator<Item = T>,
2970            T: Into<crate::generated::all::children::ButtonChild>,
2971        {
2972            let iter = iter.into_iter().map(|child_el| child_el.into());
2973            self.element.children_mut().extend(iter);
2974            self
2975        }
2976    }
2977}