html/generated/
hr.rs

1pub mod element {
2    /// The HTML `<hr>` element
3    ///
4    /// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)
5    #[doc(alias = "hr")]
6    #[non_exhaustive]
7    #[derive(PartialEq, Clone, Default)]
8    pub struct ThematicBreak {
9        sys: html_sys::text::ThematicBreak,
10    }
11    impl ThematicBreak {
12        /// Create a new builder
13        pub fn builder() -> super::builder::ThematicBreakBuilder {
14            super::builder::ThematicBreakBuilder::new(Default::default())
15        }
16    }
17    impl ThematicBreak {
18        /// Access the element's `data-*` properties
19        pub fn data_map(&self) -> &html_sys::DataMap {
20            &self.sys.data_map
21        }
22        /// Mutably access the element's `data-*` properties
23        pub fn data_map_mut(&mut self) -> &mut html_sys::DataMap {
24            &mut self.sys.data_map
25        }
26    }
27    impl ThematicBreak {
28        /// Get the value of the `role` attribute
29        pub fn role(&self) -> std::option::Option<&str> {
30            self.sys.role.as_deref()
31        }
32        /// Set the value of the `role` attribute
33        pub fn set_role(
34            &mut self,
35            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
36        ) {
37            self.sys.role = value.map(|v| v.into());
38        }
39        /// Get the value of the `aria-atomic` attribute
40        pub fn aria_atomic(&self) -> bool {
41            self.sys.aria_atomic
42        }
43        /// Set the value of the `aria-atomic` attribute
44        pub fn set_aria_atomic(&mut self, value: bool) {
45            self.sys.aria_atomic = value;
46        }
47        /// Get the value of the `aria-braillelabel` attribute
48        pub fn aria_braille_label(&self) -> std::option::Option<&str> {
49            self.sys.aria_braille_label.as_deref()
50        }
51        /// Set the value of the `aria-braillelabel` attribute
52        pub fn set_aria_braille_label(
53            &mut self,
54            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
55        ) {
56            self.sys.aria_braille_label = value.map(|v| v.into());
57        }
58        /// Get the value of the `aria-brailleroledescription` attribute
59        pub fn aria_braille_role_description(&self) -> std::option::Option<&str> {
60            self.sys.aria_braille_role_description.as_deref()
61        }
62        /// Set the value of the `aria-brailleroledescription` attribute
63        pub fn set_aria_braille_role_description(
64            &mut self,
65            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
66        ) {
67            self.sys.aria_braille_role_description = value.map(|v| v.into());
68        }
69        /// Get the value of the `aria-busy` attribute
70        pub fn aria_busy(&self) -> bool {
71            self.sys.aria_busy
72        }
73        /// Set the value of the `aria-busy` attribute
74        pub fn set_aria_busy(&mut self, value: bool) {
75            self.sys.aria_busy = value;
76        }
77        /// Get the value of the `aria-controls` attribute
78        pub fn aria_controls_elements(&self) -> std::option::Option<&str> {
79            self.sys.aria_controls_elements.as_deref()
80        }
81        /// Set the value of the `aria-controls` attribute
82        pub fn set_aria_controls_elements(
83            &mut self,
84            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
85        ) {
86            self.sys.aria_controls_elements = value.map(|v| v.into());
87        }
88        /// Get the value of the `aria-current` attribute
89        pub fn aria_current(&self) -> std::option::Option<&str> {
90            self.sys.aria_current.as_deref()
91        }
92        /// Set the value of the `aria-current` attribute
93        pub fn set_aria_current(
94            &mut self,
95            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
96        ) {
97            self.sys.aria_current = value.map(|v| v.into());
98        }
99        /// Get the value of the `aria-describedby` attribute
100        pub fn aria_described_by_elements(&self) -> std::option::Option<&str> {
101            self.sys.aria_described_by_elements.as_deref()
102        }
103        /// Set the value of the `aria-describedby` attribute
104        pub fn set_aria_described_by_elements(
105            &mut self,
106            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
107        ) {
108            self.sys.aria_described_by_elements = value.map(|v| v.into());
109        }
110        /// Get the value of the `aria-description` attribute
111        pub fn aria_description(&self) -> std::option::Option<&str> {
112            self.sys.aria_description.as_deref()
113        }
114        /// Set the value of the `aria-description` attribute
115        pub fn set_aria_description(
116            &mut self,
117            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
118        ) {
119            self.sys.aria_description = value.map(|v| v.into());
120        }
121        /// Get the value of the `aria-details` attribute
122        pub fn aria_details_elements(&self) -> std::option::Option<&str> {
123            self.sys.aria_details_elements.as_deref()
124        }
125        /// Set the value of the `aria-details` attribute
126        pub fn set_aria_details_elements(
127            &mut self,
128            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
129        ) {
130            self.sys.aria_details_elements = value.map(|v| v.into());
131        }
132        /// Get the value of the `aria-disabled` attribute
133        pub fn aria_disabled(&self) -> bool {
134            self.sys.aria_disabled
135        }
136        /// Set the value of the `aria-disabled` attribute
137        pub fn set_aria_disabled(&mut self, value: bool) {
138            self.sys.aria_disabled = value;
139        }
140        /// Get the value of the `aria-dropeffect` attribute
141        pub fn aria_drop_effect(&self) -> std::option::Option<&str> {
142            self.sys.aria_drop_effect.as_deref()
143        }
144        /// Set the value of the `aria-dropeffect` attribute
145        pub fn set_aria_drop_effect(
146            &mut self,
147            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
148        ) {
149            self.sys.aria_drop_effect = value.map(|v| v.into());
150        }
151        /// Get the value of the `aria-errormessage` attribute
152        pub fn aria_error_message_elements(&self) -> std::option::Option<&str> {
153            self.sys.aria_error_message_elements.as_deref()
154        }
155        /// Set the value of the `aria-errormessage` attribute
156        pub fn set_aria_error_message_elements(
157            &mut self,
158            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
159        ) {
160            self.sys.aria_error_message_elements = value.map(|v| v.into());
161        }
162        /// Get the value of the `aria-flowto` attribute
163        pub fn aria_flow_to_elements(&self) -> std::option::Option<&str> {
164            self.sys.aria_flow_to_elements.as_deref()
165        }
166        /// Set the value of the `aria-flowto` attribute
167        pub fn set_aria_flow_to_elements(
168            &mut self,
169            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
170        ) {
171            self.sys.aria_flow_to_elements = value.map(|v| v.into());
172        }
173        /// Get the value of the `aria-grabbed` attribute
174        pub fn aria_grabbed(&self) -> bool {
175            self.sys.aria_grabbed
176        }
177        /// Set the value of the `aria-grabbed` attribute
178        pub fn set_aria_grabbed(&mut self, value: bool) {
179            self.sys.aria_grabbed = value;
180        }
181        /// Get the value of the `aria-haspopup` attribute
182        pub fn aria_has_popup(&self) -> std::option::Option<&str> {
183            self.sys.aria_has_popup.as_deref()
184        }
185        /// Set the value of the `aria-haspopup` attribute
186        pub fn set_aria_has_popup(
187            &mut self,
188            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
189        ) {
190            self.sys.aria_has_popup = value.map(|v| v.into());
191        }
192        /// Get the value of the `aria-hidden` attribute
193        pub fn aria_hidden(&self) -> bool {
194            self.sys.aria_hidden
195        }
196        /// Set the value of the `aria-hidden` attribute
197        pub fn set_aria_hidden(&mut self, value: bool) {
198            self.sys.aria_hidden = value;
199        }
200        /// Get the value of the `aria-invalid` attribute
201        pub fn aria_invalid(&self) -> std::option::Option<&str> {
202            self.sys.aria_invalid.as_deref()
203        }
204        /// Set the value of the `aria-invalid` attribute
205        pub fn set_aria_invalid(
206            &mut self,
207            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
208        ) {
209            self.sys.aria_invalid = value.map(|v| v.into());
210        }
211        /// Get the value of the `aria-keyshortcuts` attribute
212        pub fn aria_key_shortcuts(&self) -> std::option::Option<&str> {
213            self.sys.aria_key_shortcuts.as_deref()
214        }
215        /// Set the value of the `aria-keyshortcuts` attribute
216        pub fn set_aria_key_shortcuts(
217            &mut self,
218            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
219        ) {
220            self.sys.aria_key_shortcuts = value.map(|v| v.into());
221        }
222        /// Get the value of the `aria-label` attribute
223        pub fn aria_label(&self) -> std::option::Option<&str> {
224            self.sys.aria_label.as_deref()
225        }
226        /// Set the value of the `aria-label` attribute
227        pub fn set_aria_label(
228            &mut self,
229            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
230        ) {
231            self.sys.aria_label = value.map(|v| v.into());
232        }
233        /// Get the value of the `aria-labelledby` attribute
234        pub fn aria_labelled_by_elements(&self) -> std::option::Option<&str> {
235            self.sys.aria_labelled_by_elements.as_deref()
236        }
237        /// Set the value of the `aria-labelledby` attribute
238        pub fn set_aria_labelled_by_elements(
239            &mut self,
240            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
241        ) {
242            self.sys.aria_labelled_by_elements = value.map(|v| v.into());
243        }
244        /// Get the value of the `aria-live` attribute
245        pub fn aria_live(&self) -> std::option::Option<&str> {
246            self.sys.aria_live.as_deref()
247        }
248        /// Set the value of the `aria-live` attribute
249        pub fn set_aria_live(
250            &mut self,
251            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
252        ) {
253            self.sys.aria_live = value.map(|v| v.into());
254        }
255        /// Get the value of the `aria-orientation` attribute
256        pub fn aria_orientation(&self) -> std::option::Option<&str> {
257            self.sys.aria_orientation.as_deref()
258        }
259        /// Set the value of the `aria-orientation` attribute
260        pub fn set_aria_orientation(
261            &mut self,
262            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
263        ) {
264            self.sys.aria_orientation = value.map(|v| v.into());
265        }
266        /// Get the value of the `aria-owns` attribute
267        pub fn aria_owns_elements(&self) -> std::option::Option<&str> {
268            self.sys.aria_owns_elements.as_deref()
269        }
270        /// Set the value of the `aria-owns` attribute
271        pub fn set_aria_owns_elements(
272            &mut self,
273            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
274        ) {
275            self.sys.aria_owns_elements = value.map(|v| v.into());
276        }
277        /// Get the value of the `aria-relevant` attribute
278        pub fn aria_relevant(&self) -> std::option::Option<&str> {
279            self.sys.aria_relevant.as_deref()
280        }
281        /// Set the value of the `aria-relevant` attribute
282        pub fn set_aria_relevant(
283            &mut self,
284            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
285        ) {
286            self.sys.aria_relevant = value.map(|v| v.into());
287        }
288        /// Get the value of the `aria-roledescription` attribute
289        pub fn aria_role_description(&self) -> std::option::Option<&str> {
290            self.sys.aria_role_description.as_deref()
291        }
292        /// Set the value of the `aria-roledescription` attribute
293        pub fn set_aria_role_description(
294            &mut self,
295            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
296        ) {
297            self.sys.aria_role_description = value.map(|v| v.into());
298        }
299        /// Get the value of the `aria-valuemax` attribute
300        pub fn aria_value_max(&self) -> std::option::Option<f64> {
301            self.sys.aria_value_max
302        }
303        /// Set the value of the `aria-valuemax` attribute
304        pub fn set_aria_value_max(&mut self, value: std::option::Option<f64>) {
305            self.sys.aria_value_max = value;
306        }
307        /// Get the value of the `aria-valuemin` attribute
308        pub fn aria_value_min(&self) -> std::option::Option<f64> {
309            self.sys.aria_value_min
310        }
311        /// Set the value of the `aria-valuemin` attribute
312        pub fn set_aria_value_min(&mut self, value: std::option::Option<f64>) {
313            self.sys.aria_value_min = value;
314        }
315        /// Get the value of the `aria-valuetext` attribute
316        pub fn aria_value_text(&self) -> std::option::Option<&str> {
317            self.sys.aria_value_text.as_deref()
318        }
319        /// Set the value of the `aria-valuetext` attribute
320        pub fn set_aria_value_text(
321            &mut self,
322            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
323        ) {
324            self.sys.aria_value_text = value.map(|v| v.into());
325        }
326        /// Get the value of the `accesskey` attribute
327        pub fn access_key(&self) -> std::option::Option<&str> {
328            self.sys.access_key.as_deref()
329        }
330        /// Set the value of the `accesskey` attribute
331        pub fn set_access_key(
332            &mut self,
333            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
334        ) {
335            self.sys.access_key = value.map(|v| v.into());
336        }
337        /// Get the value of the `autocapitalize` attribute
338        pub fn auto_capitalize(&self) -> std::option::Option<&str> {
339            self.sys.auto_capitalize.as_deref()
340        }
341        /// Set the value of the `autocapitalize` attribute
342        pub fn set_auto_capitalize(
343            &mut self,
344            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
345        ) {
346            self.sys.auto_capitalize = value.map(|v| v.into());
347        }
348        /// Get the value of the `autofocus` attribute
349        pub fn autofocus(&self) -> bool {
350            self.sys.autofocus
351        }
352        /// Set the value of the `autofocus` attribute
353        pub fn set_autofocus(&mut self, value: bool) {
354            self.sys.autofocus = value;
355        }
356        /// Get the value of the `class` attribute
357        pub fn class(&self) -> std::option::Option<&str> {
358            self.sys.class.as_deref()
359        }
360        /// Set the value of the `class` attribute
361        pub fn set_class(
362            &mut self,
363            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
364        ) {
365            self.sys.class = value.map(|v| v.into());
366        }
367        /// Get the value of the `contenteditable` attribute
368        pub fn content_editable(&self) -> std::option::Option<&str> {
369            self.sys.content_editable.as_deref()
370        }
371        /// Set the value of the `contenteditable` attribute
372        pub fn set_content_editable(
373            &mut self,
374            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
375        ) {
376            self.sys.content_editable = value.map(|v| v.into());
377        }
378        /// Get the value of the `dir` attribute
379        pub fn direction(&self) -> std::option::Option<&str> {
380            self.sys.direction.as_deref()
381        }
382        /// Set the value of the `dir` attribute
383        pub fn set_direction(
384            &mut self,
385            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
386        ) {
387            self.sys.direction = value.map(|v| v.into());
388        }
389        /// Get the value of the `draggable` attribute
390        pub fn draggable(&self) -> bool {
391            self.sys.draggable
392        }
393        /// Set the value of the `draggable` attribute
394        pub fn set_draggable(&mut self, value: bool) {
395            self.sys.draggable = value;
396        }
397        /// Get the value of the `enterkeyhint` attribute
398        pub fn enter_key_hint(&self) -> std::option::Option<&str> {
399            self.sys.enter_key_hint.as_deref()
400        }
401        /// Set the value of the `enterkeyhint` attribute
402        pub fn set_enter_key_hint(
403            &mut self,
404            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
405        ) {
406            self.sys.enter_key_hint = value.map(|v| v.into());
407        }
408        /// Get the value of the `exportparts` attribute
409        pub fn export_parts(&self) -> std::option::Option<&str> {
410            self.sys.export_parts.as_deref()
411        }
412        /// Set the value of the `exportparts` attribute
413        pub fn set_export_parts(
414            &mut self,
415            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
416        ) {
417            self.sys.export_parts = value.map(|v| v.into());
418        }
419        /// Get the value of the `hidden` attribute
420        pub fn hidden(&self) -> std::option::Option<&str> {
421            self.sys.hidden.as_deref()
422        }
423        /// Set the value of the `hidden` attribute
424        pub fn set_hidden(
425            &mut self,
426            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
427        ) {
428            self.sys.hidden = value.map(|v| v.into());
429        }
430        /// Get the value of the `id` attribute
431        pub fn id(&self) -> std::option::Option<&str> {
432            self.sys.id.as_deref()
433        }
434        /// Set the value of the `id` attribute
435        pub fn set_id(
436            &mut self,
437            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
438        ) {
439            self.sys.id = value.map(|v| v.into());
440        }
441        /// Get the value of the `inert` attribute
442        pub fn inert(&self) -> bool {
443            self.sys.inert
444        }
445        /// Set the value of the `inert` attribute
446        pub fn set_inert(&mut self, value: bool) {
447            self.sys.inert = value;
448        }
449        /// Get the value of the `inputmode` attribute
450        pub fn input_mode(&self) -> std::option::Option<&str> {
451            self.sys.input_mode.as_deref()
452        }
453        /// Set the value of the `inputmode` attribute
454        pub fn set_input_mode(
455            &mut self,
456            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
457        ) {
458            self.sys.input_mode = value.map(|v| v.into());
459        }
460        /// Get the value of the `is` attribute
461        pub fn is_(&self) -> std::option::Option<&str> {
462            self.sys.is_.as_deref()
463        }
464        /// Set the value of the `is` attribute
465        pub fn set_is_(
466            &mut self,
467            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
468        ) {
469            self.sys.is_ = value.map(|v| v.into());
470        }
471        /// Get the value of the `itemid` attribute
472        pub fn item_id(&self) -> std::option::Option<&str> {
473            self.sys.item_id.as_deref()
474        }
475        /// Set the value of the `itemid` attribute
476        pub fn set_item_id(
477            &mut self,
478            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
479        ) {
480            self.sys.item_id = value.map(|v| v.into());
481        }
482        /// Get the value of the `itemprop` attribute
483        pub fn item_prop(&self) -> std::option::Option<&str> {
484            self.sys.item_prop.as_deref()
485        }
486        /// Set the value of the `itemprop` attribute
487        pub fn set_item_prop(
488            &mut self,
489            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
490        ) {
491            self.sys.item_prop = value.map(|v| v.into());
492        }
493        /// Get the value of the `itemref` attribute
494        pub fn item_ref(&self) -> std::option::Option<&str> {
495            self.sys.item_ref.as_deref()
496        }
497        /// Set the value of the `itemref` attribute
498        pub fn set_item_ref(
499            &mut self,
500            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
501        ) {
502            self.sys.item_ref = value.map(|v| v.into());
503        }
504        /// Get the value of the `itemscope` attribute
505        pub fn item_scope(&self) -> std::option::Option<&str> {
506            self.sys.item_scope.as_deref()
507        }
508        /// Set the value of the `itemscope` attribute
509        pub fn set_item_scope(
510            &mut self,
511            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
512        ) {
513            self.sys.item_scope = value.map(|v| v.into());
514        }
515        /// Get the value of the `itemtype` attribute
516        pub fn item_type(&self) -> std::option::Option<&str> {
517            self.sys.item_type.as_deref()
518        }
519        /// Set the value of the `itemtype` attribute
520        pub fn set_item_type(
521            &mut self,
522            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
523        ) {
524            self.sys.item_type = value.map(|v| v.into());
525        }
526        /// Get the value of the `lang` attribute
527        pub fn lang(&self) -> std::option::Option<&str> {
528            self.sys.lang.as_deref()
529        }
530        /// Set the value of the `lang` attribute
531        pub fn set_lang(
532            &mut self,
533            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
534        ) {
535            self.sys.lang = value.map(|v| v.into());
536        }
537        /// Get the value of the `nonce` attribute
538        pub fn nonce(&self) -> std::option::Option<&str> {
539            self.sys.nonce.as_deref()
540        }
541        /// Set the value of the `nonce` attribute
542        pub fn set_nonce(
543            &mut self,
544            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
545        ) {
546            self.sys.nonce = value.map(|v| v.into());
547        }
548        /// Get the value of the `part` attribute
549        pub fn part(&self) -> std::option::Option<&str> {
550            self.sys.part.as_deref()
551        }
552        /// Set the value of the `part` attribute
553        pub fn set_part(
554            &mut self,
555            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
556        ) {
557            self.sys.part = value.map(|v| v.into());
558        }
559        /// Get the value of the `slot` attribute
560        pub fn slot(&self) -> std::option::Option<&str> {
561            self.sys.slot.as_deref()
562        }
563        /// Set the value of the `slot` attribute
564        pub fn set_slot(
565            &mut self,
566            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
567        ) {
568            self.sys.slot = value.map(|v| v.into());
569        }
570        /// Get the value of the `spellcheck` attribute
571        pub fn spellcheck(&self) -> std::option::Option<&str> {
572            self.sys.spellcheck.as_deref()
573        }
574        /// Set the value of the `spellcheck` attribute
575        pub fn set_spellcheck(
576            &mut self,
577            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
578        ) {
579            self.sys.spellcheck = value.map(|v| v.into());
580        }
581        /// Get the value of the `style` attribute
582        pub fn style(&self) -> std::option::Option<&str> {
583            self.sys.style.as_deref()
584        }
585        /// Set the value of the `style` attribute
586        pub fn set_style(
587            &mut self,
588            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
589        ) {
590            self.sys.style = value.map(|v| v.into());
591        }
592        /// Get the value of the `tabindex` attribute
593        pub fn tab_index(&self) -> std::option::Option<i64> {
594            self.sys.tab_index
595        }
596        /// Set the value of the `tabindex` attribute
597        pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
598            self.sys.tab_index = value;
599        }
600        /// Get the value of the `title` attribute
601        pub fn title(&self) -> std::option::Option<&str> {
602            self.sys.title.as_deref()
603        }
604        /// Set the value of the `title` attribute
605        pub fn set_title(
606            &mut self,
607            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
608        ) {
609            self.sys.title = value.map(|v| v.into());
610        }
611        /// Get the value of the `translate` attribute
612        pub fn translate(&self) -> bool {
613            self.sys.translate
614        }
615        /// Set the value of the `translate` attribute
616        pub fn set_translate(&mut self, value: bool) {
617            self.sys.translate = value;
618        }
619    }
620    impl crate::Render for ThematicBreak {
621        fn render(
622            &self,
623            f: &mut std::fmt::Formatter<'_>,
624            depth: usize,
625        ) -> std::fmt::Result {
626            write!(f, "{:level$}", "", level = depth * 4)?;
627            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
628            Ok(())
629        }
630    }
631    impl std::fmt::Debug for ThematicBreak {
632        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
633            crate::Render::render(self, f, 0)?;
634            Ok(())
635        }
636    }
637    impl std::fmt::Display for ThematicBreak {
638        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
639            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
640            html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
641            Ok(())
642        }
643    }
644    impl crate::HtmlElement for ThematicBreak {}
645    impl crate::FlowContent for ThematicBreak {}
646    impl std::convert::Into<html_sys::text::ThematicBreak> for ThematicBreak {
647        fn into(self) -> html_sys::text::ThematicBreak {
648            self.sys
649        }
650    }
651    impl From<html_sys::text::ThematicBreak> for ThematicBreak {
652        fn from(sys: html_sys::text::ThematicBreak) -> Self {
653            Self { sys }
654        }
655    }
656}
657pub mod child {}
658pub mod builder {
659    /// A builder struct for ThematicBreak
660    pub struct ThematicBreakBuilder {
661        element: super::element::ThematicBreak,
662    }
663    impl ThematicBreakBuilder {
664        pub(crate) fn new(element: super::element::ThematicBreak) -> Self {
665            Self { element }
666        }
667        /// Finish building the element
668        pub fn build(&mut self) -> super::element::ThematicBreak {
669            self.element.clone()
670        }
671        /// Insert a `data-*` property
672        pub fn data(
673            &mut self,
674            data_key: impl Into<std::borrow::Cow<'static, str>>,
675            value: impl Into<std::borrow::Cow<'static, str>>,
676        ) -> &mut ThematicBreakBuilder {
677            self.element.data_map_mut().insert(data_key.into(), value.into());
678            self
679        }
680        /// Set the value of the `role` attribute
681        pub fn role(
682            &mut self,
683            value: impl Into<std::borrow::Cow<'static, str>>,
684        ) -> &mut Self {
685            self.element.set_role(Some(value.into()));
686            self
687        }
688        /// Set the value of the `aria-atomic` attribute
689        pub fn aria_atomic(&mut self, value: bool) -> &mut Self {
690            self.element.set_aria_atomic(value);
691            self
692        }
693        /// Set the value of the `aria-braillelabel` attribute
694        pub fn aria_braille_label(
695            &mut self,
696            value: impl Into<std::borrow::Cow<'static, str>>,
697        ) -> &mut Self {
698            self.element.set_aria_braille_label(Some(value.into()));
699            self
700        }
701        /// Set the value of the `aria-brailleroledescription` attribute
702        pub fn aria_braille_role_description(
703            &mut self,
704            value: impl Into<std::borrow::Cow<'static, str>>,
705        ) -> &mut Self {
706            self.element.set_aria_braille_role_description(Some(value.into()));
707            self
708        }
709        /// Set the value of the `aria-busy` attribute
710        pub fn aria_busy(&mut self, value: bool) -> &mut Self {
711            self.element.set_aria_busy(value);
712            self
713        }
714        /// Set the value of the `aria-controls` attribute
715        pub fn aria_controls_elements(
716            &mut self,
717            value: impl Into<std::borrow::Cow<'static, str>>,
718        ) -> &mut Self {
719            self.element.set_aria_controls_elements(Some(value.into()));
720            self
721        }
722        /// Set the value of the `aria-current` attribute
723        pub fn aria_current(
724            &mut self,
725            value: impl Into<std::borrow::Cow<'static, str>>,
726        ) -> &mut Self {
727            self.element.set_aria_current(Some(value.into()));
728            self
729        }
730        /// Set the value of the `aria-describedby` attribute
731        pub fn aria_described_by_elements(
732            &mut self,
733            value: impl Into<std::borrow::Cow<'static, str>>,
734        ) -> &mut Self {
735            self.element.set_aria_described_by_elements(Some(value.into()));
736            self
737        }
738        /// Set the value of the `aria-description` attribute
739        pub fn aria_description(
740            &mut self,
741            value: impl Into<std::borrow::Cow<'static, str>>,
742        ) -> &mut Self {
743            self.element.set_aria_description(Some(value.into()));
744            self
745        }
746        /// Set the value of the `aria-details` attribute
747        pub fn aria_details_elements(
748            &mut self,
749            value: impl Into<std::borrow::Cow<'static, str>>,
750        ) -> &mut Self {
751            self.element.set_aria_details_elements(Some(value.into()));
752            self
753        }
754        /// Set the value of the `aria-disabled` attribute
755        pub fn aria_disabled(&mut self, value: bool) -> &mut Self {
756            self.element.set_aria_disabled(value);
757            self
758        }
759        /// Set the value of the `aria-dropeffect` attribute
760        pub fn aria_drop_effect(
761            &mut self,
762            value: impl Into<std::borrow::Cow<'static, str>>,
763        ) -> &mut Self {
764            self.element.set_aria_drop_effect(Some(value.into()));
765            self
766        }
767        /// Set the value of the `aria-errormessage` attribute
768        pub fn aria_error_message_elements(
769            &mut self,
770            value: impl Into<std::borrow::Cow<'static, str>>,
771        ) -> &mut Self {
772            self.element.set_aria_error_message_elements(Some(value.into()));
773            self
774        }
775        /// Set the value of the `aria-flowto` attribute
776        pub fn aria_flow_to_elements(
777            &mut self,
778            value: impl Into<std::borrow::Cow<'static, str>>,
779        ) -> &mut Self {
780            self.element.set_aria_flow_to_elements(Some(value.into()));
781            self
782        }
783        /// Set the value of the `aria-grabbed` attribute
784        pub fn aria_grabbed(&mut self, value: bool) -> &mut Self {
785            self.element.set_aria_grabbed(value);
786            self
787        }
788        /// Set the value of the `aria-haspopup` attribute
789        pub fn aria_has_popup(
790            &mut self,
791            value: impl Into<std::borrow::Cow<'static, str>>,
792        ) -> &mut Self {
793            self.element.set_aria_has_popup(Some(value.into()));
794            self
795        }
796        /// Set the value of the `aria-hidden` attribute
797        pub fn aria_hidden(&mut self, value: bool) -> &mut Self {
798            self.element.set_aria_hidden(value);
799            self
800        }
801        /// Set the value of the `aria-invalid` attribute
802        pub fn aria_invalid(
803            &mut self,
804            value: impl Into<std::borrow::Cow<'static, str>>,
805        ) -> &mut Self {
806            self.element.set_aria_invalid(Some(value.into()));
807            self
808        }
809        /// Set the value of the `aria-keyshortcuts` attribute
810        pub fn aria_key_shortcuts(
811            &mut self,
812            value: impl Into<std::borrow::Cow<'static, str>>,
813        ) -> &mut Self {
814            self.element.set_aria_key_shortcuts(Some(value.into()));
815            self
816        }
817        /// Set the value of the `aria-label` attribute
818        pub fn aria_label(
819            &mut self,
820            value: impl Into<std::borrow::Cow<'static, str>>,
821        ) -> &mut Self {
822            self.element.set_aria_label(Some(value.into()));
823            self
824        }
825        /// Set the value of the `aria-labelledby` attribute
826        pub fn aria_labelled_by_elements(
827            &mut self,
828            value: impl Into<std::borrow::Cow<'static, str>>,
829        ) -> &mut Self {
830            self.element.set_aria_labelled_by_elements(Some(value.into()));
831            self
832        }
833        /// Set the value of the `aria-live` attribute
834        pub fn aria_live(
835            &mut self,
836            value: impl Into<std::borrow::Cow<'static, str>>,
837        ) -> &mut Self {
838            self.element.set_aria_live(Some(value.into()));
839            self
840        }
841        /// Set the value of the `aria-orientation` attribute
842        pub fn aria_orientation(
843            &mut self,
844            value: impl Into<std::borrow::Cow<'static, str>>,
845        ) -> &mut Self {
846            self.element.set_aria_orientation(Some(value.into()));
847            self
848        }
849        /// Set the value of the `aria-owns` attribute
850        pub fn aria_owns_elements(
851            &mut self,
852            value: impl Into<std::borrow::Cow<'static, str>>,
853        ) -> &mut Self {
854            self.element.set_aria_owns_elements(Some(value.into()));
855            self
856        }
857        /// Set the value of the `aria-relevant` attribute
858        pub fn aria_relevant(
859            &mut self,
860            value: impl Into<std::borrow::Cow<'static, str>>,
861        ) -> &mut Self {
862            self.element.set_aria_relevant(Some(value.into()));
863            self
864        }
865        /// Set the value of the `aria-roledescription` attribute
866        pub fn aria_role_description(
867            &mut self,
868            value: impl Into<std::borrow::Cow<'static, str>>,
869        ) -> &mut Self {
870            self.element.set_aria_role_description(Some(value.into()));
871            self
872        }
873        /// Set the value of the `aria-valuemax` attribute
874        pub fn aria_value_max(&mut self, value: f64) -> &mut Self {
875            self.element.set_aria_value_max(Some(value));
876            self
877        }
878        /// Set the value of the `aria-valuemin` attribute
879        pub fn aria_value_min(&mut self, value: f64) -> &mut Self {
880            self.element.set_aria_value_min(Some(value));
881            self
882        }
883        /// Set the value of the `aria-valuetext` attribute
884        pub fn aria_value_text(
885            &mut self,
886            value: impl Into<std::borrow::Cow<'static, str>>,
887        ) -> &mut Self {
888            self.element.set_aria_value_text(Some(value.into()));
889            self
890        }
891        /// Set the value of the `accesskey` attribute
892        pub fn access_key(
893            &mut self,
894            value: impl Into<std::borrow::Cow<'static, str>>,
895        ) -> &mut Self {
896            self.element.set_access_key(Some(value.into()));
897            self
898        }
899        /// Set the value of the `autocapitalize` attribute
900        pub fn auto_capitalize(
901            &mut self,
902            value: impl Into<std::borrow::Cow<'static, str>>,
903        ) -> &mut Self {
904            self.element.set_auto_capitalize(Some(value.into()));
905            self
906        }
907        /// Set the value of the `autofocus` attribute
908        pub fn autofocus(&mut self, value: bool) -> &mut Self {
909            self.element.set_autofocus(value);
910            self
911        }
912        /// Set the value of the `class` attribute
913        pub fn class(
914            &mut self,
915            value: impl Into<std::borrow::Cow<'static, str>>,
916        ) -> &mut Self {
917            self.element.set_class(Some(value.into()));
918            self
919        }
920        /// Set the value of the `contenteditable` attribute
921        pub fn content_editable(
922            &mut self,
923            value: impl Into<std::borrow::Cow<'static, str>>,
924        ) -> &mut Self {
925            self.element.set_content_editable(Some(value.into()));
926            self
927        }
928        /// Set the value of the `dir` attribute
929        pub fn direction(
930            &mut self,
931            value: impl Into<std::borrow::Cow<'static, str>>,
932        ) -> &mut Self {
933            self.element.set_direction(Some(value.into()));
934            self
935        }
936        /// Set the value of the `draggable` attribute
937        pub fn draggable(&mut self, value: bool) -> &mut Self {
938            self.element.set_draggable(value);
939            self
940        }
941        /// Set the value of the `enterkeyhint` attribute
942        pub fn enter_key_hint(
943            &mut self,
944            value: impl Into<std::borrow::Cow<'static, str>>,
945        ) -> &mut Self {
946            self.element.set_enter_key_hint(Some(value.into()));
947            self
948        }
949        /// Set the value of the `exportparts` attribute
950        pub fn export_parts(
951            &mut self,
952            value: impl Into<std::borrow::Cow<'static, str>>,
953        ) -> &mut Self {
954            self.element.set_export_parts(Some(value.into()));
955            self
956        }
957        /// Set the value of the `hidden` attribute
958        pub fn hidden(
959            &mut self,
960            value: impl Into<std::borrow::Cow<'static, str>>,
961        ) -> &mut Self {
962            self.element.set_hidden(Some(value.into()));
963            self
964        }
965        /// Set the value of the `id` attribute
966        pub fn id(
967            &mut self,
968            value: impl Into<std::borrow::Cow<'static, str>>,
969        ) -> &mut Self {
970            self.element.set_id(Some(value.into()));
971            self
972        }
973        /// Set the value of the `inert` attribute
974        pub fn inert(&mut self, value: bool) -> &mut Self {
975            self.element.set_inert(value);
976            self
977        }
978        /// Set the value of the `inputmode` attribute
979        pub fn input_mode(
980            &mut self,
981            value: impl Into<std::borrow::Cow<'static, str>>,
982        ) -> &mut Self {
983            self.element.set_input_mode(Some(value.into()));
984            self
985        }
986        /// Set the value of the `is` attribute
987        pub fn is_(
988            &mut self,
989            value: impl Into<std::borrow::Cow<'static, str>>,
990        ) -> &mut Self {
991            self.element.set_is_(Some(value.into()));
992            self
993        }
994        /// Set the value of the `itemid` attribute
995        pub fn item_id(
996            &mut self,
997            value: impl Into<std::borrow::Cow<'static, str>>,
998        ) -> &mut Self {
999            self.element.set_item_id(Some(value.into()));
1000            self
1001        }
1002        /// Set the value of the `itemprop` attribute
1003        pub fn item_prop(
1004            &mut self,
1005            value: impl Into<std::borrow::Cow<'static, str>>,
1006        ) -> &mut Self {
1007            self.element.set_item_prop(Some(value.into()));
1008            self
1009        }
1010        /// Set the value of the `itemref` attribute
1011        pub fn item_ref(
1012            &mut self,
1013            value: impl Into<std::borrow::Cow<'static, str>>,
1014        ) -> &mut Self {
1015            self.element.set_item_ref(Some(value.into()));
1016            self
1017        }
1018        /// Set the value of the `itemscope` attribute
1019        pub fn item_scope(
1020            &mut self,
1021            value: impl Into<std::borrow::Cow<'static, str>>,
1022        ) -> &mut Self {
1023            self.element.set_item_scope(Some(value.into()));
1024            self
1025        }
1026        /// Set the value of the `itemtype` attribute
1027        pub fn item_type(
1028            &mut self,
1029            value: impl Into<std::borrow::Cow<'static, str>>,
1030        ) -> &mut Self {
1031            self.element.set_item_type(Some(value.into()));
1032            self
1033        }
1034        /// Set the value of the `lang` attribute
1035        pub fn lang(
1036            &mut self,
1037            value: impl Into<std::borrow::Cow<'static, str>>,
1038        ) -> &mut Self {
1039            self.element.set_lang(Some(value.into()));
1040            self
1041        }
1042        /// Set the value of the `nonce` attribute
1043        pub fn nonce(
1044            &mut self,
1045            value: impl Into<std::borrow::Cow<'static, str>>,
1046        ) -> &mut Self {
1047            self.element.set_nonce(Some(value.into()));
1048            self
1049        }
1050        /// Set the value of the `part` attribute
1051        pub fn part(
1052            &mut self,
1053            value: impl Into<std::borrow::Cow<'static, str>>,
1054        ) -> &mut Self {
1055            self.element.set_part(Some(value.into()));
1056            self
1057        }
1058        /// Set the value of the `slot` attribute
1059        pub fn slot(
1060            &mut self,
1061            value: impl Into<std::borrow::Cow<'static, str>>,
1062        ) -> &mut Self {
1063            self.element.set_slot(Some(value.into()));
1064            self
1065        }
1066        /// Set the value of the `spellcheck` attribute
1067        pub fn spellcheck(
1068            &mut self,
1069            value: impl Into<std::borrow::Cow<'static, str>>,
1070        ) -> &mut Self {
1071            self.element.set_spellcheck(Some(value.into()));
1072            self
1073        }
1074        /// Set the value of the `style` attribute
1075        pub fn style(
1076            &mut self,
1077            value: impl Into<std::borrow::Cow<'static, str>>,
1078        ) -> &mut Self {
1079            self.element.set_style(Some(value.into()));
1080            self
1081        }
1082        /// Set the value of the `tabindex` attribute
1083        pub fn tab_index(&mut self, value: i64) -> &mut Self {
1084            self.element.set_tab_index(Some(value));
1085            self
1086        }
1087        /// Set the value of the `title` attribute
1088        pub fn title(
1089            &mut self,
1090            value: impl Into<std::borrow::Cow<'static, str>>,
1091        ) -> &mut Self {
1092            self.element.set_title(Some(value.into()));
1093            self
1094        }
1095        /// Set the value of the `translate` attribute
1096        pub fn translate(&mut self, value: bool) -> &mut Self {
1097            self.element.set_translate(value);
1098            self
1099        }
1100    }
1101}