html/generated/
rt.rs

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