1pub mod element {
2 #[doc(alias = "ruby")]
6 #[non_exhaustive]
7 #[derive(PartialEq, Clone, Default)]
8 pub struct RubyAnnotation {
9 sys: html_sys::text::RubyAnnotation,
10 }
11 impl RubyAnnotation {
12 pub fn builder() -> super::builder::RubyAnnotationBuilder {
14 super::builder::RubyAnnotationBuilder::new(Default::default())
15 }
16 }
17 impl RubyAnnotation {
18 pub fn data_map(&self) -> &html_sys::DataMap {
20 &self.sys.data_map
21 }
22 pub fn data_map_mut(&mut self) -> &mut html_sys::DataMap {
24 &mut self.sys.data_map
25 }
26 }
27 impl RubyAnnotation {
28 pub fn role(&self) -> std::option::Option<&str> {
30 self.sys.role.as_deref()
31 }
32 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 pub fn aria_active_descendant_element(&self) -> std::option::Option<&str> {
41 self.sys.aria_active_descendant_element.as_deref()
42 }
43 pub fn set_aria_active_descendant_element(
45 &mut self,
46 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
47 ) {
48 self.sys.aria_active_descendant_element = value.map(|v| v.into());
49 }
50 pub fn aria_atomic(&self) -> bool {
52 self.sys.aria_atomic
53 }
54 pub fn set_aria_atomic(&mut self, value: bool) {
56 self.sys.aria_atomic = value;
57 }
58 pub fn aria_auto_complete(&self) -> std::option::Option<&str> {
60 self.sys.aria_auto_complete.as_deref()
61 }
62 pub fn set_aria_auto_complete(
64 &mut self,
65 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
66 ) {
67 self.sys.aria_auto_complete = value.map(|v| v.into());
68 }
69 pub fn aria_braille_label(&self) -> std::option::Option<&str> {
71 self.sys.aria_braille_label.as_deref()
72 }
73 pub fn set_aria_braille_label(
75 &mut self,
76 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
77 ) {
78 self.sys.aria_braille_label = value.map(|v| v.into());
79 }
80 pub fn aria_braille_role_description(&self) -> std::option::Option<&str> {
82 self.sys.aria_braille_role_description.as_deref()
83 }
84 pub fn set_aria_braille_role_description(
86 &mut self,
87 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
88 ) {
89 self.sys.aria_braille_role_description = value.map(|v| v.into());
90 }
91 pub fn aria_busy(&self) -> bool {
93 self.sys.aria_busy
94 }
95 pub fn set_aria_busy(&mut self, value: bool) {
97 self.sys.aria_busy = value;
98 }
99 pub fn aria_checked(&self) -> std::option::Option<&str> {
101 self.sys.aria_checked.as_deref()
102 }
103 pub fn set_aria_checked(
105 &mut self,
106 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
107 ) {
108 self.sys.aria_checked = value.map(|v| v.into());
109 }
110 pub fn aria_col_count(&self) -> std::option::Option<i64> {
112 self.sys.aria_col_count
113 }
114 pub fn set_aria_col_count(&mut self, value: std::option::Option<i64>) {
116 self.sys.aria_col_count = value;
117 }
118 pub fn aria_col_index(&self) -> std::option::Option<i64> {
120 self.sys.aria_col_index
121 }
122 pub fn set_aria_col_index(&mut self, value: std::option::Option<i64>) {
124 self.sys.aria_col_index = value;
125 }
126 pub fn aria_col_index_text(&self) -> std::option::Option<&str> {
128 self.sys.aria_col_index_text.as_deref()
129 }
130 pub fn set_aria_col_index_text(
132 &mut self,
133 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
134 ) {
135 self.sys.aria_col_index_text = value.map(|v| v.into());
136 }
137 pub fn aria_col_span(&self) -> std::option::Option<i64> {
139 self.sys.aria_col_span
140 }
141 pub fn set_aria_col_span(&mut self, value: std::option::Option<i64>) {
143 self.sys.aria_col_span = value;
144 }
145 pub fn aria_controls_elements(&self) -> std::option::Option<&str> {
147 self.sys.aria_controls_elements.as_deref()
148 }
149 pub fn set_aria_controls_elements(
151 &mut self,
152 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
153 ) {
154 self.sys.aria_controls_elements = value.map(|v| v.into());
155 }
156 pub fn aria_current(&self) -> std::option::Option<&str> {
158 self.sys.aria_current.as_deref()
159 }
160 pub fn set_aria_current(
162 &mut self,
163 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
164 ) {
165 self.sys.aria_current = value.map(|v| v.into());
166 }
167 pub fn aria_described_by_elements(&self) -> std::option::Option<&str> {
169 self.sys.aria_described_by_elements.as_deref()
170 }
171 pub fn set_aria_described_by_elements(
173 &mut self,
174 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
175 ) {
176 self.sys.aria_described_by_elements = value.map(|v| v.into());
177 }
178 pub fn aria_description(&self) -> std::option::Option<&str> {
180 self.sys.aria_description.as_deref()
181 }
182 pub fn set_aria_description(
184 &mut self,
185 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
186 ) {
187 self.sys.aria_description = value.map(|v| v.into());
188 }
189 pub fn aria_details_elements(&self) -> std::option::Option<&str> {
191 self.sys.aria_details_elements.as_deref()
192 }
193 pub fn set_aria_details_elements(
195 &mut self,
196 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
197 ) {
198 self.sys.aria_details_elements = value.map(|v| v.into());
199 }
200 pub fn aria_disabled(&self) -> bool {
202 self.sys.aria_disabled
203 }
204 pub fn set_aria_disabled(&mut self, value: bool) {
206 self.sys.aria_disabled = value;
207 }
208 pub fn aria_drop_effect(&self) -> std::option::Option<&str> {
210 self.sys.aria_drop_effect.as_deref()
211 }
212 pub fn set_aria_drop_effect(
214 &mut self,
215 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
216 ) {
217 self.sys.aria_drop_effect = value.map(|v| v.into());
218 }
219 pub fn aria_error_message_elements(&self) -> std::option::Option<&str> {
221 self.sys.aria_error_message_elements.as_deref()
222 }
223 pub fn set_aria_error_message_elements(
225 &mut self,
226 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
227 ) {
228 self.sys.aria_error_message_elements = value.map(|v| v.into());
229 }
230 pub fn aria_expanded(&self) -> bool {
232 self.sys.aria_expanded
233 }
234 pub fn set_aria_expanded(&mut self, value: bool) {
236 self.sys.aria_expanded = value;
237 }
238 pub fn aria_flow_to_elements(&self) -> std::option::Option<&str> {
240 self.sys.aria_flow_to_elements.as_deref()
241 }
242 pub fn set_aria_flow_to_elements(
244 &mut self,
245 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
246 ) {
247 self.sys.aria_flow_to_elements = value.map(|v| v.into());
248 }
249 pub fn aria_grabbed(&self) -> bool {
251 self.sys.aria_grabbed
252 }
253 pub fn set_aria_grabbed(&mut self, value: bool) {
255 self.sys.aria_grabbed = value;
256 }
257 pub fn aria_has_popup(&self) -> std::option::Option<&str> {
259 self.sys.aria_has_popup.as_deref()
260 }
261 pub fn set_aria_has_popup(
263 &mut self,
264 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
265 ) {
266 self.sys.aria_has_popup = value.map(|v| v.into());
267 }
268 pub fn aria_hidden(&self) -> bool {
270 self.sys.aria_hidden
271 }
272 pub fn set_aria_hidden(&mut self, value: bool) {
274 self.sys.aria_hidden = value;
275 }
276 pub fn aria_invalid(&self) -> std::option::Option<&str> {
278 self.sys.aria_invalid.as_deref()
279 }
280 pub fn set_aria_invalid(
282 &mut self,
283 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
284 ) {
285 self.sys.aria_invalid = value.map(|v| v.into());
286 }
287 pub fn aria_key_shortcuts(&self) -> std::option::Option<&str> {
289 self.sys.aria_key_shortcuts.as_deref()
290 }
291 pub fn set_aria_key_shortcuts(
293 &mut self,
294 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
295 ) {
296 self.sys.aria_key_shortcuts = value.map(|v| v.into());
297 }
298 pub fn aria_label(&self) -> std::option::Option<&str> {
300 self.sys.aria_label.as_deref()
301 }
302 pub fn set_aria_label(
304 &mut self,
305 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
306 ) {
307 self.sys.aria_label = value.map(|v| v.into());
308 }
309 pub fn aria_labelled_by_elements(&self) -> std::option::Option<&str> {
311 self.sys.aria_labelled_by_elements.as_deref()
312 }
313 pub fn set_aria_labelled_by_elements(
315 &mut self,
316 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
317 ) {
318 self.sys.aria_labelled_by_elements = value.map(|v| v.into());
319 }
320 pub fn aria_level(&self) -> std::option::Option<i64> {
322 self.sys.aria_level
323 }
324 pub fn set_aria_level(&mut self, value: std::option::Option<i64>) {
326 self.sys.aria_level = value;
327 }
328 pub fn aria_live(&self) -> std::option::Option<&str> {
330 self.sys.aria_live.as_deref()
331 }
332 pub fn set_aria_live(
334 &mut self,
335 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
336 ) {
337 self.sys.aria_live = value.map(|v| v.into());
338 }
339 pub fn aria_modal(&self) -> bool {
341 self.sys.aria_modal
342 }
343 pub fn set_aria_modal(&mut self, value: bool) {
345 self.sys.aria_modal = value;
346 }
347 pub fn aria_multi_line(&self) -> bool {
349 self.sys.aria_multi_line
350 }
351 pub fn set_aria_multi_line(&mut self, value: bool) {
353 self.sys.aria_multi_line = value;
354 }
355 pub fn aria_multi_selectable(&self) -> bool {
357 self.sys.aria_multi_selectable
358 }
359 pub fn set_aria_multi_selectable(&mut self, value: bool) {
361 self.sys.aria_multi_selectable = value;
362 }
363 pub fn aria_orientation(&self) -> std::option::Option<&str> {
365 self.sys.aria_orientation.as_deref()
366 }
367 pub fn set_aria_orientation(
369 &mut self,
370 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
371 ) {
372 self.sys.aria_orientation = value.map(|v| v.into());
373 }
374 pub fn aria_owns_elements(&self) -> std::option::Option<&str> {
376 self.sys.aria_owns_elements.as_deref()
377 }
378 pub fn set_aria_owns_elements(
380 &mut self,
381 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
382 ) {
383 self.sys.aria_owns_elements = value.map(|v| v.into());
384 }
385 pub fn aria_placeholder(&self) -> std::option::Option<&str> {
387 self.sys.aria_placeholder.as_deref()
388 }
389 pub fn set_aria_placeholder(
391 &mut self,
392 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
393 ) {
394 self.sys.aria_placeholder = value.map(|v| v.into());
395 }
396 pub fn aria_pos_in_set(&self) -> std::option::Option<i64> {
398 self.sys.aria_pos_in_set
399 }
400 pub fn set_aria_pos_in_set(&mut self, value: std::option::Option<i64>) {
402 self.sys.aria_pos_in_set = value;
403 }
404 pub fn aria_pressed(&self) -> std::option::Option<&str> {
406 self.sys.aria_pressed.as_deref()
407 }
408 pub fn set_aria_pressed(
410 &mut self,
411 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
412 ) {
413 self.sys.aria_pressed = value.map(|v| v.into());
414 }
415 pub fn aria_read_only(&self) -> bool {
417 self.sys.aria_read_only
418 }
419 pub fn set_aria_read_only(&mut self, value: bool) {
421 self.sys.aria_read_only = value;
422 }
423 pub fn aria_relevant(&self) -> std::option::Option<&str> {
425 self.sys.aria_relevant.as_deref()
426 }
427 pub fn set_aria_relevant(
429 &mut self,
430 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
431 ) {
432 self.sys.aria_relevant = value.map(|v| v.into());
433 }
434 pub fn aria_required(&self) -> bool {
436 self.sys.aria_required
437 }
438 pub fn set_aria_required(&mut self, value: bool) {
440 self.sys.aria_required = value;
441 }
442 pub fn aria_role_description(&self) -> std::option::Option<&str> {
444 self.sys.aria_role_description.as_deref()
445 }
446 pub fn set_aria_role_description(
448 &mut self,
449 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
450 ) {
451 self.sys.aria_role_description = value.map(|v| v.into());
452 }
453 pub fn aria_row_count(&self) -> std::option::Option<i64> {
455 self.sys.aria_row_count
456 }
457 pub fn set_aria_row_count(&mut self, value: std::option::Option<i64>) {
459 self.sys.aria_row_count = value;
460 }
461 pub fn aria_row_index(&self) -> std::option::Option<i64> {
463 self.sys.aria_row_index
464 }
465 pub fn set_aria_row_index(&mut self, value: std::option::Option<i64>) {
467 self.sys.aria_row_index = value;
468 }
469 pub fn aria_row_index_text(&self) -> std::option::Option<&str> {
471 self.sys.aria_row_index_text.as_deref()
472 }
473 pub fn set_aria_row_index_text(
475 &mut self,
476 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
477 ) {
478 self.sys.aria_row_index_text = value.map(|v| v.into());
479 }
480 pub fn aria_row_span(&self) -> std::option::Option<i64> {
482 self.sys.aria_row_span
483 }
484 pub fn set_aria_row_span(&mut self, value: std::option::Option<i64>) {
486 self.sys.aria_row_span = value;
487 }
488 pub fn aria_selected(&self) -> bool {
490 self.sys.aria_selected
491 }
492 pub fn set_aria_selected(&mut self, value: bool) {
494 self.sys.aria_selected = value;
495 }
496 pub fn aria_set_size(&self) -> std::option::Option<i64> {
498 self.sys.aria_set_size
499 }
500 pub fn set_aria_set_size(&mut self, value: std::option::Option<i64>) {
502 self.sys.aria_set_size = value;
503 }
504 pub fn aria_sort(&self) -> std::option::Option<&str> {
506 self.sys.aria_sort.as_deref()
507 }
508 pub fn set_aria_sort(
510 &mut self,
511 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
512 ) {
513 self.sys.aria_sort = value.map(|v| v.into());
514 }
515 pub fn aria_value_max(&self) -> std::option::Option<f64> {
517 self.sys.aria_value_max
518 }
519 pub fn set_aria_value_max(&mut self, value: std::option::Option<f64>) {
521 self.sys.aria_value_max = value;
522 }
523 pub fn aria_value_min(&self) -> std::option::Option<f64> {
525 self.sys.aria_value_min
526 }
527 pub fn set_aria_value_min(&mut self, value: std::option::Option<f64>) {
529 self.sys.aria_value_min = value;
530 }
531 pub fn aria_value_now(&self) -> std::option::Option<f64> {
533 self.sys.aria_value_now
534 }
535 pub fn set_aria_value_now(&mut self, value: std::option::Option<f64>) {
537 self.sys.aria_value_now = value;
538 }
539 pub fn aria_value_text(&self) -> std::option::Option<&str> {
541 self.sys.aria_value_text.as_deref()
542 }
543 pub fn set_aria_value_text(
545 &mut self,
546 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
547 ) {
548 self.sys.aria_value_text = value.map(|v| v.into());
549 }
550 pub fn access_key(&self) -> std::option::Option<&str> {
552 self.sys.access_key.as_deref()
553 }
554 pub fn set_access_key(
556 &mut self,
557 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
558 ) {
559 self.sys.access_key = value.map(|v| v.into());
560 }
561 pub fn auto_capitalize(&self) -> std::option::Option<&str> {
563 self.sys.auto_capitalize.as_deref()
564 }
565 pub fn set_auto_capitalize(
567 &mut self,
568 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
569 ) {
570 self.sys.auto_capitalize = value.map(|v| v.into());
571 }
572 pub fn autofocus(&self) -> bool {
574 self.sys.autofocus
575 }
576 pub fn set_autofocus(&mut self, value: bool) {
578 self.sys.autofocus = value;
579 }
580 pub fn class(&self) -> std::option::Option<&str> {
582 self.sys.class.as_deref()
583 }
584 pub fn set_class(
586 &mut self,
587 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
588 ) {
589 self.sys.class = value.map(|v| v.into());
590 }
591 pub fn content_editable(&self) -> std::option::Option<&str> {
593 self.sys.content_editable.as_deref()
594 }
595 pub fn set_content_editable(
597 &mut self,
598 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
599 ) {
600 self.sys.content_editable = value.map(|v| v.into());
601 }
602 pub fn direction(&self) -> std::option::Option<&str> {
604 self.sys.direction.as_deref()
605 }
606 pub fn set_direction(
608 &mut self,
609 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
610 ) {
611 self.sys.direction = value.map(|v| v.into());
612 }
613 pub fn draggable(&self) -> bool {
615 self.sys.draggable
616 }
617 pub fn set_draggable(&mut self, value: bool) {
619 self.sys.draggable = value;
620 }
621 pub fn enter_key_hint(&self) -> std::option::Option<&str> {
623 self.sys.enter_key_hint.as_deref()
624 }
625 pub fn set_enter_key_hint(
627 &mut self,
628 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
629 ) {
630 self.sys.enter_key_hint = value.map(|v| v.into());
631 }
632 pub fn export_parts(&self) -> std::option::Option<&str> {
634 self.sys.export_parts.as_deref()
635 }
636 pub fn set_export_parts(
638 &mut self,
639 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
640 ) {
641 self.sys.export_parts = value.map(|v| v.into());
642 }
643 pub fn hidden(&self) -> std::option::Option<&str> {
645 self.sys.hidden.as_deref()
646 }
647 pub fn set_hidden(
649 &mut self,
650 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
651 ) {
652 self.sys.hidden = value.map(|v| v.into());
653 }
654 pub fn id(&self) -> std::option::Option<&str> {
656 self.sys.id.as_deref()
657 }
658 pub fn set_id(
660 &mut self,
661 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
662 ) {
663 self.sys.id = value.map(|v| v.into());
664 }
665 pub fn inert(&self) -> bool {
667 self.sys.inert
668 }
669 pub fn set_inert(&mut self, value: bool) {
671 self.sys.inert = value;
672 }
673 pub fn input_mode(&self) -> std::option::Option<&str> {
675 self.sys.input_mode.as_deref()
676 }
677 pub fn set_input_mode(
679 &mut self,
680 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
681 ) {
682 self.sys.input_mode = value.map(|v| v.into());
683 }
684 pub fn is_(&self) -> std::option::Option<&str> {
686 self.sys.is_.as_deref()
687 }
688 pub fn set_is_(
690 &mut self,
691 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
692 ) {
693 self.sys.is_ = value.map(|v| v.into());
694 }
695 pub fn item_id(&self) -> std::option::Option<&str> {
697 self.sys.item_id.as_deref()
698 }
699 pub fn set_item_id(
701 &mut self,
702 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
703 ) {
704 self.sys.item_id = value.map(|v| v.into());
705 }
706 pub fn item_prop(&self) -> std::option::Option<&str> {
708 self.sys.item_prop.as_deref()
709 }
710 pub fn set_item_prop(
712 &mut self,
713 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
714 ) {
715 self.sys.item_prop = value.map(|v| v.into());
716 }
717 pub fn item_ref(&self) -> std::option::Option<&str> {
719 self.sys.item_ref.as_deref()
720 }
721 pub fn set_item_ref(
723 &mut self,
724 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
725 ) {
726 self.sys.item_ref = value.map(|v| v.into());
727 }
728 pub fn item_scope(&self) -> std::option::Option<&str> {
730 self.sys.item_scope.as_deref()
731 }
732 pub fn set_item_scope(
734 &mut self,
735 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
736 ) {
737 self.sys.item_scope = value.map(|v| v.into());
738 }
739 pub fn item_type(&self) -> std::option::Option<&str> {
741 self.sys.item_type.as_deref()
742 }
743 pub fn set_item_type(
745 &mut self,
746 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
747 ) {
748 self.sys.item_type = value.map(|v| v.into());
749 }
750 pub fn lang(&self) -> std::option::Option<&str> {
752 self.sys.lang.as_deref()
753 }
754 pub fn set_lang(
756 &mut self,
757 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
758 ) {
759 self.sys.lang = value.map(|v| v.into());
760 }
761 pub fn nonce(&self) -> std::option::Option<&str> {
763 self.sys.nonce.as_deref()
764 }
765 pub fn set_nonce(
767 &mut self,
768 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
769 ) {
770 self.sys.nonce = value.map(|v| v.into());
771 }
772 pub fn part(&self) -> std::option::Option<&str> {
774 self.sys.part.as_deref()
775 }
776 pub fn set_part(
778 &mut self,
779 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
780 ) {
781 self.sys.part = value.map(|v| v.into());
782 }
783 pub fn slot(&self) -> std::option::Option<&str> {
785 self.sys.slot.as_deref()
786 }
787 pub fn set_slot(
789 &mut self,
790 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
791 ) {
792 self.sys.slot = value.map(|v| v.into());
793 }
794 pub fn spellcheck(&self) -> std::option::Option<&str> {
796 self.sys.spellcheck.as_deref()
797 }
798 pub fn set_spellcheck(
800 &mut self,
801 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
802 ) {
803 self.sys.spellcheck = value.map(|v| v.into());
804 }
805 pub fn style(&self) -> std::option::Option<&str> {
807 self.sys.style.as_deref()
808 }
809 pub fn set_style(
811 &mut self,
812 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
813 ) {
814 self.sys.style = value.map(|v| v.into());
815 }
816 pub fn tab_index(&self) -> std::option::Option<i64> {
818 self.sys.tab_index
819 }
820 pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
822 self.sys.tab_index = value;
823 }
824 pub fn title(&self) -> std::option::Option<&str> {
826 self.sys.title.as_deref()
827 }
828 pub fn set_title(
830 &mut self,
831 value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
832 ) {
833 self.sys.title = value.map(|v| v.into());
834 }
835 pub fn translate(&self) -> bool {
837 self.sys.translate
838 }
839 pub fn set_translate(&mut self, value: bool) {
841 self.sys.translate = value;
842 }
843 }
844 impl crate::Render for RubyAnnotation {
845 fn render(
846 &self,
847 f: &mut std::fmt::Formatter<'_>,
848 depth: usize,
849 ) -> std::fmt::Result {
850 write!(f, "{:level$}", "", level = depth * 4)?;
851 html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
852 write!(f, "{:level$}", "", level = depth * 4)?;
853 html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
854 Ok(())
855 }
856 }
857 impl std::fmt::Debug for RubyAnnotation {
858 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
859 crate::Render::render(self, f, 0)?;
860 Ok(())
861 }
862 }
863 impl std::fmt::Display for RubyAnnotation {
864 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
865 html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
866 html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
867 Ok(())
868 }
869 }
870 impl crate::HtmlElement for RubyAnnotation {}
871 impl crate::FlowContent for RubyAnnotation {}
872 impl crate::PhrasingContent for RubyAnnotation {}
873 impl crate::PalpableContent for RubyAnnotation {}
874 impl std::convert::Into<html_sys::text::RubyAnnotation> for RubyAnnotation {
875 fn into(self) -> html_sys::text::RubyAnnotation {
876 self.sys
877 }
878 }
879 impl From<html_sys::text::RubyAnnotation> for RubyAnnotation {
880 fn from(sys: html_sys::text::RubyAnnotation) -> Self {
881 Self { sys }
882 }
883 }
884}
885pub mod child {}
886pub mod builder {
887 pub struct RubyAnnotationBuilder {
889 element: super::element::RubyAnnotation,
890 }
891 impl RubyAnnotationBuilder {
892 pub(crate) fn new(element: super::element::RubyAnnotation) -> Self {
893 Self { element }
894 }
895 pub fn build(&mut self) -> super::element::RubyAnnotation {
897 self.element.clone()
898 }
899 pub fn data(
901 &mut self,
902 data_key: impl Into<std::borrow::Cow<'static, str>>,
903 value: impl Into<std::borrow::Cow<'static, str>>,
904 ) -> &mut RubyAnnotationBuilder {
905 self.element.data_map_mut().insert(data_key.into(), value.into());
906 self
907 }
908 pub fn role(
910 &mut self,
911 value: impl Into<std::borrow::Cow<'static, str>>,
912 ) -> &mut Self {
913 self.element.set_role(Some(value.into()));
914 self
915 }
916 pub fn aria_active_descendant_element(
918 &mut self,
919 value: impl Into<std::borrow::Cow<'static, str>>,
920 ) -> &mut Self {
921 self.element.set_aria_active_descendant_element(Some(value.into()));
922 self
923 }
924 pub fn aria_atomic(&mut self, value: bool) -> &mut Self {
926 self.element.set_aria_atomic(value);
927 self
928 }
929 pub fn aria_auto_complete(
931 &mut self,
932 value: impl Into<std::borrow::Cow<'static, str>>,
933 ) -> &mut Self {
934 self.element.set_aria_auto_complete(Some(value.into()));
935 self
936 }
937 pub fn aria_braille_label(
939 &mut self,
940 value: impl Into<std::borrow::Cow<'static, str>>,
941 ) -> &mut Self {
942 self.element.set_aria_braille_label(Some(value.into()));
943 self
944 }
945 pub fn aria_braille_role_description(
947 &mut self,
948 value: impl Into<std::borrow::Cow<'static, str>>,
949 ) -> &mut Self {
950 self.element.set_aria_braille_role_description(Some(value.into()));
951 self
952 }
953 pub fn aria_busy(&mut self, value: bool) -> &mut Self {
955 self.element.set_aria_busy(value);
956 self
957 }
958 pub fn aria_checked(
960 &mut self,
961 value: impl Into<std::borrow::Cow<'static, str>>,
962 ) -> &mut Self {
963 self.element.set_aria_checked(Some(value.into()));
964 self
965 }
966 pub fn aria_col_count(&mut self, value: i64) -> &mut Self {
968 self.element.set_aria_col_count(Some(value));
969 self
970 }
971 pub fn aria_col_index(&mut self, value: i64) -> &mut Self {
973 self.element.set_aria_col_index(Some(value));
974 self
975 }
976 pub fn aria_col_index_text(
978 &mut self,
979 value: impl Into<std::borrow::Cow<'static, str>>,
980 ) -> &mut Self {
981 self.element.set_aria_col_index_text(Some(value.into()));
982 self
983 }
984 pub fn aria_col_span(&mut self, value: i64) -> &mut Self {
986 self.element.set_aria_col_span(Some(value));
987 self
988 }
989 pub fn aria_controls_elements(
991 &mut self,
992 value: impl Into<std::borrow::Cow<'static, str>>,
993 ) -> &mut Self {
994 self.element.set_aria_controls_elements(Some(value.into()));
995 self
996 }
997 pub fn aria_current(
999 &mut self,
1000 value: impl Into<std::borrow::Cow<'static, str>>,
1001 ) -> &mut Self {
1002 self.element.set_aria_current(Some(value.into()));
1003 self
1004 }
1005 pub fn aria_described_by_elements(
1007 &mut self,
1008 value: impl Into<std::borrow::Cow<'static, str>>,
1009 ) -> &mut Self {
1010 self.element.set_aria_described_by_elements(Some(value.into()));
1011 self
1012 }
1013 pub fn aria_description(
1015 &mut self,
1016 value: impl Into<std::borrow::Cow<'static, str>>,
1017 ) -> &mut Self {
1018 self.element.set_aria_description(Some(value.into()));
1019 self
1020 }
1021 pub fn aria_details_elements(
1023 &mut self,
1024 value: impl Into<std::borrow::Cow<'static, str>>,
1025 ) -> &mut Self {
1026 self.element.set_aria_details_elements(Some(value.into()));
1027 self
1028 }
1029 pub fn aria_disabled(&mut self, value: bool) -> &mut Self {
1031 self.element.set_aria_disabled(value);
1032 self
1033 }
1034 pub fn aria_drop_effect(
1036 &mut self,
1037 value: impl Into<std::borrow::Cow<'static, str>>,
1038 ) -> &mut Self {
1039 self.element.set_aria_drop_effect(Some(value.into()));
1040 self
1041 }
1042 pub fn aria_error_message_elements(
1044 &mut self,
1045 value: impl Into<std::borrow::Cow<'static, str>>,
1046 ) -> &mut Self {
1047 self.element.set_aria_error_message_elements(Some(value.into()));
1048 self
1049 }
1050 pub fn aria_expanded(&mut self, value: bool) -> &mut Self {
1052 self.element.set_aria_expanded(value);
1053 self
1054 }
1055 pub fn aria_flow_to_elements(
1057 &mut self,
1058 value: impl Into<std::borrow::Cow<'static, str>>,
1059 ) -> &mut Self {
1060 self.element.set_aria_flow_to_elements(Some(value.into()));
1061 self
1062 }
1063 pub fn aria_grabbed(&mut self, value: bool) -> &mut Self {
1065 self.element.set_aria_grabbed(value);
1066 self
1067 }
1068 pub fn aria_has_popup(
1070 &mut self,
1071 value: impl Into<std::borrow::Cow<'static, str>>,
1072 ) -> &mut Self {
1073 self.element.set_aria_has_popup(Some(value.into()));
1074 self
1075 }
1076 pub fn aria_hidden(&mut self, value: bool) -> &mut Self {
1078 self.element.set_aria_hidden(value);
1079 self
1080 }
1081 pub fn aria_invalid(
1083 &mut self,
1084 value: impl Into<std::borrow::Cow<'static, str>>,
1085 ) -> &mut Self {
1086 self.element.set_aria_invalid(Some(value.into()));
1087 self
1088 }
1089 pub fn aria_key_shortcuts(
1091 &mut self,
1092 value: impl Into<std::borrow::Cow<'static, str>>,
1093 ) -> &mut Self {
1094 self.element.set_aria_key_shortcuts(Some(value.into()));
1095 self
1096 }
1097 pub fn aria_label(
1099 &mut self,
1100 value: impl Into<std::borrow::Cow<'static, str>>,
1101 ) -> &mut Self {
1102 self.element.set_aria_label(Some(value.into()));
1103 self
1104 }
1105 pub fn aria_labelled_by_elements(
1107 &mut self,
1108 value: impl Into<std::borrow::Cow<'static, str>>,
1109 ) -> &mut Self {
1110 self.element.set_aria_labelled_by_elements(Some(value.into()));
1111 self
1112 }
1113 pub fn aria_level(&mut self, value: i64) -> &mut Self {
1115 self.element.set_aria_level(Some(value));
1116 self
1117 }
1118 pub fn aria_live(
1120 &mut self,
1121 value: impl Into<std::borrow::Cow<'static, str>>,
1122 ) -> &mut Self {
1123 self.element.set_aria_live(Some(value.into()));
1124 self
1125 }
1126 pub fn aria_modal(&mut self, value: bool) -> &mut Self {
1128 self.element.set_aria_modal(value);
1129 self
1130 }
1131 pub fn aria_multi_line(&mut self, value: bool) -> &mut Self {
1133 self.element.set_aria_multi_line(value);
1134 self
1135 }
1136 pub fn aria_multi_selectable(&mut self, value: bool) -> &mut Self {
1138 self.element.set_aria_multi_selectable(value);
1139 self
1140 }
1141 pub fn aria_orientation(
1143 &mut self,
1144 value: impl Into<std::borrow::Cow<'static, str>>,
1145 ) -> &mut Self {
1146 self.element.set_aria_orientation(Some(value.into()));
1147 self
1148 }
1149 pub fn aria_owns_elements(
1151 &mut self,
1152 value: impl Into<std::borrow::Cow<'static, str>>,
1153 ) -> &mut Self {
1154 self.element.set_aria_owns_elements(Some(value.into()));
1155 self
1156 }
1157 pub fn aria_placeholder(
1159 &mut self,
1160 value: impl Into<std::borrow::Cow<'static, str>>,
1161 ) -> &mut Self {
1162 self.element.set_aria_placeholder(Some(value.into()));
1163 self
1164 }
1165 pub fn aria_pos_in_set(&mut self, value: i64) -> &mut Self {
1167 self.element.set_aria_pos_in_set(Some(value));
1168 self
1169 }
1170 pub fn aria_pressed(
1172 &mut self,
1173 value: impl Into<std::borrow::Cow<'static, str>>,
1174 ) -> &mut Self {
1175 self.element.set_aria_pressed(Some(value.into()));
1176 self
1177 }
1178 pub fn aria_read_only(&mut self, value: bool) -> &mut Self {
1180 self.element.set_aria_read_only(value);
1181 self
1182 }
1183 pub fn aria_relevant(
1185 &mut self,
1186 value: impl Into<std::borrow::Cow<'static, str>>,
1187 ) -> &mut Self {
1188 self.element.set_aria_relevant(Some(value.into()));
1189 self
1190 }
1191 pub fn aria_required(&mut self, value: bool) -> &mut Self {
1193 self.element.set_aria_required(value);
1194 self
1195 }
1196 pub fn aria_role_description(
1198 &mut self,
1199 value: impl Into<std::borrow::Cow<'static, str>>,
1200 ) -> &mut Self {
1201 self.element.set_aria_role_description(Some(value.into()));
1202 self
1203 }
1204 pub fn aria_row_count(&mut self, value: i64) -> &mut Self {
1206 self.element.set_aria_row_count(Some(value));
1207 self
1208 }
1209 pub fn aria_row_index(&mut self, value: i64) -> &mut Self {
1211 self.element.set_aria_row_index(Some(value));
1212 self
1213 }
1214 pub fn aria_row_index_text(
1216 &mut self,
1217 value: impl Into<std::borrow::Cow<'static, str>>,
1218 ) -> &mut Self {
1219 self.element.set_aria_row_index_text(Some(value.into()));
1220 self
1221 }
1222 pub fn aria_row_span(&mut self, value: i64) -> &mut Self {
1224 self.element.set_aria_row_span(Some(value));
1225 self
1226 }
1227 pub fn aria_selected(&mut self, value: bool) -> &mut Self {
1229 self.element.set_aria_selected(value);
1230 self
1231 }
1232 pub fn aria_set_size(&mut self, value: i64) -> &mut Self {
1234 self.element.set_aria_set_size(Some(value));
1235 self
1236 }
1237 pub fn aria_sort(
1239 &mut self,
1240 value: impl Into<std::borrow::Cow<'static, str>>,
1241 ) -> &mut Self {
1242 self.element.set_aria_sort(Some(value.into()));
1243 self
1244 }
1245 pub fn aria_value_max(&mut self, value: f64) -> &mut Self {
1247 self.element.set_aria_value_max(Some(value));
1248 self
1249 }
1250 pub fn aria_value_min(&mut self, value: f64) -> &mut Self {
1252 self.element.set_aria_value_min(Some(value));
1253 self
1254 }
1255 pub fn aria_value_now(&mut self, value: f64) -> &mut Self {
1257 self.element.set_aria_value_now(Some(value));
1258 self
1259 }
1260 pub fn aria_value_text(
1262 &mut self,
1263 value: impl Into<std::borrow::Cow<'static, str>>,
1264 ) -> &mut Self {
1265 self.element.set_aria_value_text(Some(value.into()));
1266 self
1267 }
1268 pub fn access_key(
1270 &mut self,
1271 value: impl Into<std::borrow::Cow<'static, str>>,
1272 ) -> &mut Self {
1273 self.element.set_access_key(Some(value.into()));
1274 self
1275 }
1276 pub fn auto_capitalize(
1278 &mut self,
1279 value: impl Into<std::borrow::Cow<'static, str>>,
1280 ) -> &mut Self {
1281 self.element.set_auto_capitalize(Some(value.into()));
1282 self
1283 }
1284 pub fn autofocus(&mut self, value: bool) -> &mut Self {
1286 self.element.set_autofocus(value);
1287 self
1288 }
1289 pub fn class(
1291 &mut self,
1292 value: impl Into<std::borrow::Cow<'static, str>>,
1293 ) -> &mut Self {
1294 self.element.set_class(Some(value.into()));
1295 self
1296 }
1297 pub fn content_editable(
1299 &mut self,
1300 value: impl Into<std::borrow::Cow<'static, str>>,
1301 ) -> &mut Self {
1302 self.element.set_content_editable(Some(value.into()));
1303 self
1304 }
1305 pub fn direction(
1307 &mut self,
1308 value: impl Into<std::borrow::Cow<'static, str>>,
1309 ) -> &mut Self {
1310 self.element.set_direction(Some(value.into()));
1311 self
1312 }
1313 pub fn draggable(&mut self, value: bool) -> &mut Self {
1315 self.element.set_draggable(value);
1316 self
1317 }
1318 pub fn enter_key_hint(
1320 &mut self,
1321 value: impl Into<std::borrow::Cow<'static, str>>,
1322 ) -> &mut Self {
1323 self.element.set_enter_key_hint(Some(value.into()));
1324 self
1325 }
1326 pub fn export_parts(
1328 &mut self,
1329 value: impl Into<std::borrow::Cow<'static, str>>,
1330 ) -> &mut Self {
1331 self.element.set_export_parts(Some(value.into()));
1332 self
1333 }
1334 pub fn hidden(
1336 &mut self,
1337 value: impl Into<std::borrow::Cow<'static, str>>,
1338 ) -> &mut Self {
1339 self.element.set_hidden(Some(value.into()));
1340 self
1341 }
1342 pub fn id(
1344 &mut self,
1345 value: impl Into<std::borrow::Cow<'static, str>>,
1346 ) -> &mut Self {
1347 self.element.set_id(Some(value.into()));
1348 self
1349 }
1350 pub fn inert(&mut self, value: bool) -> &mut Self {
1352 self.element.set_inert(value);
1353 self
1354 }
1355 pub fn input_mode(
1357 &mut self,
1358 value: impl Into<std::borrow::Cow<'static, str>>,
1359 ) -> &mut Self {
1360 self.element.set_input_mode(Some(value.into()));
1361 self
1362 }
1363 pub fn is_(
1365 &mut self,
1366 value: impl Into<std::borrow::Cow<'static, str>>,
1367 ) -> &mut Self {
1368 self.element.set_is_(Some(value.into()));
1369 self
1370 }
1371 pub fn item_id(
1373 &mut self,
1374 value: impl Into<std::borrow::Cow<'static, str>>,
1375 ) -> &mut Self {
1376 self.element.set_item_id(Some(value.into()));
1377 self
1378 }
1379 pub fn item_prop(
1381 &mut self,
1382 value: impl Into<std::borrow::Cow<'static, str>>,
1383 ) -> &mut Self {
1384 self.element.set_item_prop(Some(value.into()));
1385 self
1386 }
1387 pub fn item_ref(
1389 &mut self,
1390 value: impl Into<std::borrow::Cow<'static, str>>,
1391 ) -> &mut Self {
1392 self.element.set_item_ref(Some(value.into()));
1393 self
1394 }
1395 pub fn item_scope(
1397 &mut self,
1398 value: impl Into<std::borrow::Cow<'static, str>>,
1399 ) -> &mut Self {
1400 self.element.set_item_scope(Some(value.into()));
1401 self
1402 }
1403 pub fn item_type(
1405 &mut self,
1406 value: impl Into<std::borrow::Cow<'static, str>>,
1407 ) -> &mut Self {
1408 self.element.set_item_type(Some(value.into()));
1409 self
1410 }
1411 pub fn lang(
1413 &mut self,
1414 value: impl Into<std::borrow::Cow<'static, str>>,
1415 ) -> &mut Self {
1416 self.element.set_lang(Some(value.into()));
1417 self
1418 }
1419 pub fn nonce(
1421 &mut self,
1422 value: impl Into<std::borrow::Cow<'static, str>>,
1423 ) -> &mut Self {
1424 self.element.set_nonce(Some(value.into()));
1425 self
1426 }
1427 pub fn part(
1429 &mut self,
1430 value: impl Into<std::borrow::Cow<'static, str>>,
1431 ) -> &mut Self {
1432 self.element.set_part(Some(value.into()));
1433 self
1434 }
1435 pub fn slot(
1437 &mut self,
1438 value: impl Into<std::borrow::Cow<'static, str>>,
1439 ) -> &mut Self {
1440 self.element.set_slot(Some(value.into()));
1441 self
1442 }
1443 pub fn spellcheck(
1445 &mut self,
1446 value: impl Into<std::borrow::Cow<'static, str>>,
1447 ) -> &mut Self {
1448 self.element.set_spellcheck(Some(value.into()));
1449 self
1450 }
1451 pub fn style(
1453 &mut self,
1454 value: impl Into<std::borrow::Cow<'static, str>>,
1455 ) -> &mut Self {
1456 self.element.set_style(Some(value.into()));
1457 self
1458 }
1459 pub fn tab_index(&mut self, value: i64) -> &mut Self {
1461 self.element.set_tab_index(Some(value));
1462 self
1463 }
1464 pub fn title(
1466 &mut self,
1467 value: impl Into<std::borrow::Cow<'static, str>>,
1468 ) -> &mut Self {
1469 self.element.set_title(Some(value.into()));
1470 self
1471 }
1472 pub fn translate(&mut self, value: bool) -> &mut Self {
1474 self.element.set_translate(value);
1475 self
1476 }
1477 }
1478}