1pub mod element {
2    #[doc(alias = "wbr")]
6    #[non_exhaustive]
7    #[derive(PartialEq, Clone, Default)]
8    pub struct LineBreakOpportunity {
9        sys: html_sys::text::LineBreakOpportunity,
10    }
11    impl LineBreakOpportunity {
12        pub fn builder() -> super::builder::LineBreakOpportunityBuilder {
14            super::builder::LineBreakOpportunityBuilder::new(Default::default())
15        }
16    }
17    impl LineBreakOpportunity {
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 LineBreakOpportunity {
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_hidden(&self) -> bool {
41            self.sys.aria_hidden
42        }
43        pub fn set_aria_hidden(&mut self, value: bool) {
45            self.sys.aria_hidden = value;
46        }
47        pub fn access_key(&self) -> std::option::Option<&str> {
49            self.sys.access_key.as_deref()
50        }
51        pub fn set_access_key(
53            &mut self,
54            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
55        ) {
56            self.sys.access_key = value.map(|v| v.into());
57        }
58        pub fn auto_capitalize(&self) -> std::option::Option<&str> {
60            self.sys.auto_capitalize.as_deref()
61        }
62        pub fn set_auto_capitalize(
64            &mut self,
65            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
66        ) {
67            self.sys.auto_capitalize = value.map(|v| v.into());
68        }
69        pub fn autofocus(&self) -> bool {
71            self.sys.autofocus
72        }
73        pub fn set_autofocus(&mut self, value: bool) {
75            self.sys.autofocus = value;
76        }
77        pub fn class(&self) -> std::option::Option<&str> {
79            self.sys.class.as_deref()
80        }
81        pub fn set_class(
83            &mut self,
84            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
85        ) {
86            self.sys.class = value.map(|v| v.into());
87        }
88        pub fn content_editable(&self) -> std::option::Option<&str> {
90            self.sys.content_editable.as_deref()
91        }
92        pub fn set_content_editable(
94            &mut self,
95            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
96        ) {
97            self.sys.content_editable = value.map(|v| v.into());
98        }
99        pub fn direction(&self) -> std::option::Option<&str> {
101            self.sys.direction.as_deref()
102        }
103        pub fn set_direction(
105            &mut self,
106            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
107        ) {
108            self.sys.direction = value.map(|v| v.into());
109        }
110        pub fn draggable(&self) -> bool {
112            self.sys.draggable
113        }
114        pub fn set_draggable(&mut self, value: bool) {
116            self.sys.draggable = value;
117        }
118        pub fn enter_key_hint(&self) -> std::option::Option<&str> {
120            self.sys.enter_key_hint.as_deref()
121        }
122        pub fn set_enter_key_hint(
124            &mut self,
125            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
126        ) {
127            self.sys.enter_key_hint = value.map(|v| v.into());
128        }
129        pub fn export_parts(&self) -> std::option::Option<&str> {
131            self.sys.export_parts.as_deref()
132        }
133        pub fn set_export_parts(
135            &mut self,
136            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
137        ) {
138            self.sys.export_parts = value.map(|v| v.into());
139        }
140        pub fn hidden(&self) -> std::option::Option<&str> {
142            self.sys.hidden.as_deref()
143        }
144        pub fn set_hidden(
146            &mut self,
147            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
148        ) {
149            self.sys.hidden = value.map(|v| v.into());
150        }
151        pub fn id(&self) -> std::option::Option<&str> {
153            self.sys.id.as_deref()
154        }
155        pub fn set_id(
157            &mut self,
158            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
159        ) {
160            self.sys.id = value.map(|v| v.into());
161        }
162        pub fn inert(&self) -> bool {
164            self.sys.inert
165        }
166        pub fn set_inert(&mut self, value: bool) {
168            self.sys.inert = value;
169        }
170        pub fn input_mode(&self) -> std::option::Option<&str> {
172            self.sys.input_mode.as_deref()
173        }
174        pub fn set_input_mode(
176            &mut self,
177            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
178        ) {
179            self.sys.input_mode = value.map(|v| v.into());
180        }
181        pub fn is_(&self) -> std::option::Option<&str> {
183            self.sys.is_.as_deref()
184        }
185        pub fn set_is_(
187            &mut self,
188            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
189        ) {
190            self.sys.is_ = value.map(|v| v.into());
191        }
192        pub fn item_id(&self) -> std::option::Option<&str> {
194            self.sys.item_id.as_deref()
195        }
196        pub fn set_item_id(
198            &mut self,
199            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
200        ) {
201            self.sys.item_id = value.map(|v| v.into());
202        }
203        pub fn item_prop(&self) -> std::option::Option<&str> {
205            self.sys.item_prop.as_deref()
206        }
207        pub fn set_item_prop(
209            &mut self,
210            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
211        ) {
212            self.sys.item_prop = value.map(|v| v.into());
213        }
214        pub fn item_ref(&self) -> std::option::Option<&str> {
216            self.sys.item_ref.as_deref()
217        }
218        pub fn set_item_ref(
220            &mut self,
221            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
222        ) {
223            self.sys.item_ref = value.map(|v| v.into());
224        }
225        pub fn item_scope(&self) -> std::option::Option<&str> {
227            self.sys.item_scope.as_deref()
228        }
229        pub fn set_item_scope(
231            &mut self,
232            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
233        ) {
234            self.sys.item_scope = value.map(|v| v.into());
235        }
236        pub fn item_type(&self) -> std::option::Option<&str> {
238            self.sys.item_type.as_deref()
239        }
240        pub fn set_item_type(
242            &mut self,
243            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
244        ) {
245            self.sys.item_type = value.map(|v| v.into());
246        }
247        pub fn lang(&self) -> std::option::Option<&str> {
249            self.sys.lang.as_deref()
250        }
251        pub fn set_lang(
253            &mut self,
254            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
255        ) {
256            self.sys.lang = value.map(|v| v.into());
257        }
258        pub fn nonce(&self) -> std::option::Option<&str> {
260            self.sys.nonce.as_deref()
261        }
262        pub fn set_nonce(
264            &mut self,
265            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
266        ) {
267            self.sys.nonce = value.map(|v| v.into());
268        }
269        pub fn part(&self) -> std::option::Option<&str> {
271            self.sys.part.as_deref()
272        }
273        pub fn set_part(
275            &mut self,
276            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
277        ) {
278            self.sys.part = value.map(|v| v.into());
279        }
280        pub fn slot(&self) -> std::option::Option<&str> {
282            self.sys.slot.as_deref()
283        }
284        pub fn set_slot(
286            &mut self,
287            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
288        ) {
289            self.sys.slot = value.map(|v| v.into());
290        }
291        pub fn spellcheck(&self) -> std::option::Option<&str> {
293            self.sys.spellcheck.as_deref()
294        }
295        pub fn set_spellcheck(
297            &mut self,
298            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
299        ) {
300            self.sys.spellcheck = value.map(|v| v.into());
301        }
302        pub fn style(&self) -> std::option::Option<&str> {
304            self.sys.style.as_deref()
305        }
306        pub fn set_style(
308            &mut self,
309            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
310        ) {
311            self.sys.style = value.map(|v| v.into());
312        }
313        pub fn tab_index(&self) -> std::option::Option<i64> {
315            self.sys.tab_index
316        }
317        pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
319            self.sys.tab_index = value;
320        }
321        pub fn title(&self) -> std::option::Option<&str> {
323            self.sys.title.as_deref()
324        }
325        pub fn set_title(
327            &mut self,
328            value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
329        ) {
330            self.sys.title = value.map(|v| v.into());
331        }
332        pub fn translate(&self) -> bool {
334            self.sys.translate
335        }
336        pub fn set_translate(&mut self, value: bool) {
338            self.sys.translate = value;
339        }
340    }
341    impl crate::Render for LineBreakOpportunity {
342        fn render(
343            &self,
344            f: &mut std::fmt::Formatter<'_>,
345            depth: usize,
346        ) -> std::fmt::Result {
347            write!(f, "{:level$}", "", level = depth * 4)?;
348            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
349            Ok(())
350        }
351    }
352    impl std::fmt::Debug for LineBreakOpportunity {
353        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
354            crate::Render::render(self, f, 0)?;
355            Ok(())
356        }
357    }
358    impl std::fmt::Display for LineBreakOpportunity {
359        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
360            html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
361            html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
362            Ok(())
363        }
364    }
365    impl crate::HtmlElement for LineBreakOpportunity {}
366    impl crate::FlowContent for LineBreakOpportunity {}
367    impl crate::PhrasingContent for LineBreakOpportunity {}
368    impl std::convert::Into<html_sys::text::LineBreakOpportunity>
369    for LineBreakOpportunity {
370        fn into(self) -> html_sys::text::LineBreakOpportunity {
371            self.sys
372        }
373    }
374    impl From<html_sys::text::LineBreakOpportunity> for LineBreakOpportunity {
375        fn from(sys: html_sys::text::LineBreakOpportunity) -> Self {
376            Self { sys }
377        }
378    }
379}
380pub mod child {}
381pub mod builder {
382    pub struct LineBreakOpportunityBuilder {
384        element: super::element::LineBreakOpportunity,
385    }
386    impl LineBreakOpportunityBuilder {
387        pub(crate) fn new(element: super::element::LineBreakOpportunity) -> Self {
388            Self { element }
389        }
390        pub fn build(&mut self) -> super::element::LineBreakOpportunity {
392            self.element.clone()
393        }
394        pub fn data(
396            &mut self,
397            data_key: impl Into<std::borrow::Cow<'static, str>>,
398            value: impl Into<std::borrow::Cow<'static, str>>,
399        ) -> &mut LineBreakOpportunityBuilder {
400            self.element.data_map_mut().insert(data_key.into(), value.into());
401            self
402        }
403        pub fn role(
405            &mut self,
406            value: impl Into<std::borrow::Cow<'static, str>>,
407        ) -> &mut Self {
408            self.element.set_role(Some(value.into()));
409            self
410        }
411        pub fn aria_hidden(&mut self, value: bool) -> &mut Self {
413            self.element.set_aria_hidden(value);
414            self
415        }
416        pub fn access_key(
418            &mut self,
419            value: impl Into<std::borrow::Cow<'static, str>>,
420        ) -> &mut Self {
421            self.element.set_access_key(Some(value.into()));
422            self
423        }
424        pub fn auto_capitalize(
426            &mut self,
427            value: impl Into<std::borrow::Cow<'static, str>>,
428        ) -> &mut Self {
429            self.element.set_auto_capitalize(Some(value.into()));
430            self
431        }
432        pub fn autofocus(&mut self, value: bool) -> &mut Self {
434            self.element.set_autofocus(value);
435            self
436        }
437        pub fn class(
439            &mut self,
440            value: impl Into<std::borrow::Cow<'static, str>>,
441        ) -> &mut Self {
442            self.element.set_class(Some(value.into()));
443            self
444        }
445        pub fn content_editable(
447            &mut self,
448            value: impl Into<std::borrow::Cow<'static, str>>,
449        ) -> &mut Self {
450            self.element.set_content_editable(Some(value.into()));
451            self
452        }
453        pub fn direction(
455            &mut self,
456            value: impl Into<std::borrow::Cow<'static, str>>,
457        ) -> &mut Self {
458            self.element.set_direction(Some(value.into()));
459            self
460        }
461        pub fn draggable(&mut self, value: bool) -> &mut Self {
463            self.element.set_draggable(value);
464            self
465        }
466        pub fn enter_key_hint(
468            &mut self,
469            value: impl Into<std::borrow::Cow<'static, str>>,
470        ) -> &mut Self {
471            self.element.set_enter_key_hint(Some(value.into()));
472            self
473        }
474        pub fn export_parts(
476            &mut self,
477            value: impl Into<std::borrow::Cow<'static, str>>,
478        ) -> &mut Self {
479            self.element.set_export_parts(Some(value.into()));
480            self
481        }
482        pub fn hidden(
484            &mut self,
485            value: impl Into<std::borrow::Cow<'static, str>>,
486        ) -> &mut Self {
487            self.element.set_hidden(Some(value.into()));
488            self
489        }
490        pub fn id(
492            &mut self,
493            value: impl Into<std::borrow::Cow<'static, str>>,
494        ) -> &mut Self {
495            self.element.set_id(Some(value.into()));
496            self
497        }
498        pub fn inert(&mut self, value: bool) -> &mut Self {
500            self.element.set_inert(value);
501            self
502        }
503        pub fn input_mode(
505            &mut self,
506            value: impl Into<std::borrow::Cow<'static, str>>,
507        ) -> &mut Self {
508            self.element.set_input_mode(Some(value.into()));
509            self
510        }
511        pub fn is_(
513            &mut self,
514            value: impl Into<std::borrow::Cow<'static, str>>,
515        ) -> &mut Self {
516            self.element.set_is_(Some(value.into()));
517            self
518        }
519        pub fn item_id(
521            &mut self,
522            value: impl Into<std::borrow::Cow<'static, str>>,
523        ) -> &mut Self {
524            self.element.set_item_id(Some(value.into()));
525            self
526        }
527        pub fn item_prop(
529            &mut self,
530            value: impl Into<std::borrow::Cow<'static, str>>,
531        ) -> &mut Self {
532            self.element.set_item_prop(Some(value.into()));
533            self
534        }
535        pub fn item_ref(
537            &mut self,
538            value: impl Into<std::borrow::Cow<'static, str>>,
539        ) -> &mut Self {
540            self.element.set_item_ref(Some(value.into()));
541            self
542        }
543        pub fn item_scope(
545            &mut self,
546            value: impl Into<std::borrow::Cow<'static, str>>,
547        ) -> &mut Self {
548            self.element.set_item_scope(Some(value.into()));
549            self
550        }
551        pub fn item_type(
553            &mut self,
554            value: impl Into<std::borrow::Cow<'static, str>>,
555        ) -> &mut Self {
556            self.element.set_item_type(Some(value.into()));
557            self
558        }
559        pub fn lang(
561            &mut self,
562            value: impl Into<std::borrow::Cow<'static, str>>,
563        ) -> &mut Self {
564            self.element.set_lang(Some(value.into()));
565            self
566        }
567        pub fn nonce(
569            &mut self,
570            value: impl Into<std::borrow::Cow<'static, str>>,
571        ) -> &mut Self {
572            self.element.set_nonce(Some(value.into()));
573            self
574        }
575        pub fn part(
577            &mut self,
578            value: impl Into<std::borrow::Cow<'static, str>>,
579        ) -> &mut Self {
580            self.element.set_part(Some(value.into()));
581            self
582        }
583        pub fn slot(
585            &mut self,
586            value: impl Into<std::borrow::Cow<'static, str>>,
587        ) -> &mut Self {
588            self.element.set_slot(Some(value.into()));
589            self
590        }
591        pub fn spellcheck(
593            &mut self,
594            value: impl Into<std::borrow::Cow<'static, str>>,
595        ) -> &mut Self {
596            self.element.set_spellcheck(Some(value.into()));
597            self
598        }
599        pub fn style(
601            &mut self,
602            value: impl Into<std::borrow::Cow<'static, str>>,
603        ) -> &mut Self {
604            self.element.set_style(Some(value.into()));
605            self
606        }
607        pub fn tab_index(&mut self, value: i64) -> &mut Self {
609            self.element.set_tab_index(Some(value));
610            self
611        }
612        pub fn title(
614            &mut self,
615            value: impl Into<std::borrow::Cow<'static, str>>,
616        ) -> &mut Self {
617            self.element.set_title(Some(value.into()));
618            self
619        }
620        pub fn translate(&mut self, value: bool) -> &mut Self {
622            self.element.set_translate(value);
623            self
624        }
625    }
626}