#[non_exhaustive]pub struct Heading2 { /* private fields */ }Expand description
The HTML <h2> element
Implementations§
source§impl Heading2
impl Heading2
sourcepub fn set_role(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_role(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the role attribute
sourcepub fn aria_atomic(&self) -> bool
pub fn aria_atomic(&self) -> bool
Get the value of the aria-atomic attribute
sourcepub fn set_aria_atomic(&mut self, value: bool)
pub fn set_aria_atomic(&mut self, value: bool)
Set the value of the aria-atomic attribute
sourcepub fn aria_braille_label(&self) -> Option<&str>
pub fn aria_braille_label(&self) -> Option<&str>
Get the value of the aria-braillelabel attribute
sourcepub fn set_aria_braille_label(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_braille_label( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-braillelabel attribute
sourcepub fn aria_braille_role_description(&self) -> Option<&str>
pub fn aria_braille_role_description(&self) -> Option<&str>
Get the value of the aria-brailleroledescription attribute
sourcepub fn set_aria_braille_role_description(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_braille_role_description( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-brailleroledescription attribute
sourcepub fn set_aria_busy(&mut self, value: bool)
pub fn set_aria_busy(&mut self, value: bool)
Set the value of the aria-busy attribute
sourcepub fn aria_controls_elements(&self) -> Option<&str>
pub fn aria_controls_elements(&self) -> Option<&str>
Get the value of the aria-controls attribute
sourcepub fn set_aria_controls_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_controls_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-controls attribute
sourcepub fn aria_current(&self) -> Option<&str>
pub fn aria_current(&self) -> Option<&str>
Get the value of the aria-current attribute
sourcepub fn set_aria_current(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_aria_current(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the aria-current attribute
sourcepub fn aria_described_by_elements(&self) -> Option<&str>
pub fn aria_described_by_elements(&self) -> Option<&str>
Get the value of the aria-describedby attribute
sourcepub fn set_aria_described_by_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_described_by_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-describedby attribute
sourcepub fn aria_description(&self) -> Option<&str>
pub fn aria_description(&self) -> Option<&str>
Get the value of the aria-description attribute
sourcepub fn set_aria_description(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_description( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-description attribute
sourcepub fn aria_details_elements(&self) -> Option<&str>
pub fn aria_details_elements(&self) -> Option<&str>
Get the value of the aria-details attribute
sourcepub fn set_aria_details_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_details_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-details attribute
sourcepub fn aria_disabled(&self) -> bool
pub fn aria_disabled(&self) -> bool
Get the value of the aria-disabled attribute
sourcepub fn set_aria_disabled(&mut self, value: bool)
pub fn set_aria_disabled(&mut self, value: bool)
Set the value of the aria-disabled attribute
sourcepub fn aria_drop_effect(&self) -> Option<&str>
pub fn aria_drop_effect(&self) -> Option<&str>
Get the value of the aria-dropeffect attribute
sourcepub fn set_aria_drop_effect(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_drop_effect( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-dropeffect attribute
sourcepub fn aria_error_message_elements(&self) -> Option<&str>
pub fn aria_error_message_elements(&self) -> Option<&str>
Get the value of the aria-errormessage attribute
sourcepub fn set_aria_error_message_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_error_message_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-errormessage attribute
sourcepub fn aria_expanded(&self) -> bool
pub fn aria_expanded(&self) -> bool
Get the value of the aria-expanded attribute
sourcepub fn set_aria_expanded(&mut self, value: bool)
pub fn set_aria_expanded(&mut self, value: bool)
Set the value of the aria-expanded attribute
sourcepub fn aria_flow_to_elements(&self) -> Option<&str>
pub fn aria_flow_to_elements(&self) -> Option<&str>
Get the value of the aria-flowto attribute
sourcepub fn set_aria_flow_to_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_flow_to_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-flowto attribute
sourcepub fn aria_grabbed(&self) -> bool
pub fn aria_grabbed(&self) -> bool
Get the value of the aria-grabbed attribute
sourcepub fn set_aria_grabbed(&mut self, value: bool)
pub fn set_aria_grabbed(&mut self, value: bool)
Set the value of the aria-grabbed attribute
sourcepub fn aria_has_popup(&self) -> Option<&str>
pub fn aria_has_popup(&self) -> Option<&str>
Get the value of the aria-haspopup attribute
sourcepub fn set_aria_has_popup(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_has_popup( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-haspopup attribute
Get the value of the aria-hidden attribute
Set the value of the aria-hidden attribute
sourcepub fn aria_invalid(&self) -> Option<&str>
pub fn aria_invalid(&self) -> Option<&str>
Get the value of the aria-invalid attribute
sourcepub fn set_aria_invalid(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_aria_invalid(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the aria-invalid attribute
sourcepub fn aria_key_shortcuts(&self) -> Option<&str>
pub fn aria_key_shortcuts(&self) -> Option<&str>
Get the value of the aria-keyshortcuts attribute
sourcepub fn set_aria_key_shortcuts(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_key_shortcuts( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-keyshortcuts attribute
sourcepub fn aria_label(&self) -> Option<&str>
pub fn aria_label(&self) -> Option<&str>
Get the value of the aria-label attribute
sourcepub fn set_aria_label(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_aria_label(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the aria-label attribute
sourcepub fn aria_labelled_by_elements(&self) -> Option<&str>
pub fn aria_labelled_by_elements(&self) -> Option<&str>
Get the value of the aria-labelledby attribute
sourcepub fn set_aria_labelled_by_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_labelled_by_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-labelledby attribute
sourcepub fn set_aria_live(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_aria_live(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the aria-live attribute
sourcepub fn aria_owns_elements(&self) -> Option<&str>
pub fn aria_owns_elements(&self) -> Option<&str>
Get the value of the aria-owns attribute
sourcepub fn set_aria_owns_elements(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_owns_elements( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-owns attribute
sourcepub fn aria_pos_in_set(&self) -> Option<i64>
pub fn aria_pos_in_set(&self) -> Option<i64>
Get the value of the aria-posinset attribute
sourcepub fn set_aria_pos_in_set(&mut self, value: Option<i64>)
pub fn set_aria_pos_in_set(&mut self, value: Option<i64>)
Set the value of the aria-posinset attribute
sourcepub fn aria_relevant(&self) -> Option<&str>
pub fn aria_relevant(&self) -> Option<&str>
Get the value of the aria-relevant attribute
sourcepub fn set_aria_relevant(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_aria_relevant(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the aria-relevant attribute
sourcepub fn aria_role_description(&self) -> Option<&str>
pub fn aria_role_description(&self) -> Option<&str>
Get the value of the aria-roledescription attribute
sourcepub fn set_aria_role_description(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_aria_role_description( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the aria-roledescription attribute
sourcepub fn aria_selected(&self) -> bool
pub fn aria_selected(&self) -> bool
Get the value of the aria-selected attribute
sourcepub fn set_aria_selected(&mut self, value: bool)
pub fn set_aria_selected(&mut self, value: bool)
Set the value of the aria-selected attribute
sourcepub fn aria_set_size(&self) -> Option<i64>
pub fn aria_set_size(&self) -> Option<i64>
Get the value of the aria-setsize attribute
sourcepub fn set_aria_set_size(&mut self, value: Option<i64>)
pub fn set_aria_set_size(&mut self, value: Option<i64>)
Set the value of the aria-setsize attribute
sourcepub fn access_key(&self) -> Option<&str>
pub fn access_key(&self) -> Option<&str>
Get the value of the accesskey attribute
sourcepub fn set_access_key(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_access_key(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the accesskey attribute
sourcepub fn auto_capitalize(&self) -> Option<&str>
pub fn auto_capitalize(&self) -> Option<&str>
Get the value of the autocapitalize attribute
sourcepub fn set_auto_capitalize(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_auto_capitalize( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the autocapitalize attribute
sourcepub fn set_autofocus(&mut self, value: bool)
pub fn set_autofocus(&mut self, value: bool)
Set the value of the autofocus attribute
sourcepub fn set_class(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_class(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the class attribute
sourcepub fn content_editable(&self) -> Option<&str>
pub fn content_editable(&self) -> Option<&str>
Get the value of the contenteditable attribute
sourcepub fn set_content_editable(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_content_editable( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the contenteditable attribute
sourcepub fn set_direction(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_direction(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the dir attribute
sourcepub fn set_draggable(&mut self, value: bool)
pub fn set_draggable(&mut self, value: bool)
Set the value of the draggable attribute
sourcepub fn enter_key_hint(&self) -> Option<&str>
pub fn enter_key_hint(&self) -> Option<&str>
Get the value of the enterkeyhint attribute
sourcepub fn set_enter_key_hint(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_enter_key_hint( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the enterkeyhint attribute
sourcepub fn export_parts(&self) -> Option<&str>
pub fn export_parts(&self) -> Option<&str>
Get the value of the exportparts attribute
sourcepub fn set_export_parts(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_export_parts(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the exportparts attribute
Get the value of the hidden attribute
Set the value of the hidden attribute
sourcepub fn set_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the id attribute
sourcepub fn input_mode(&self) -> Option<&str>
pub fn input_mode(&self) -> Option<&str>
Get the value of the inputmode attribute
sourcepub fn set_input_mode(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_input_mode(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the inputmode attribute
sourcepub fn set_is_(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_is_(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the is attribute
sourcepub fn set_item_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_item_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the itemid attribute
sourcepub fn set_item_prop(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_item_prop(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the itemprop attribute
sourcepub fn set_item_ref(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_item_ref(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the itemref attribute
sourcepub fn item_scope(&self) -> Option<&str>
pub fn item_scope(&self) -> Option<&str>
Get the value of the itemscope attribute
sourcepub fn set_item_scope(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_item_scope(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the itemscope attribute
sourcepub fn set_item_type(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_item_type(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the itemtype attribute
sourcepub fn set_lang(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_lang(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the lang attribute
sourcepub fn set_nonce(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_nonce(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the nonce attribute
sourcepub fn set_part(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_part(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the part attribute
sourcepub fn set_slot(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_slot(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the slot attribute
sourcepub fn spellcheck(&self) -> Option<&str>
pub fn spellcheck(&self) -> Option<&str>
Get the value of the spellcheck attribute
sourcepub fn set_spellcheck(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_spellcheck(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the spellcheck attribute
sourcepub fn set_style(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_style(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the style attribute
sourcepub fn set_tab_index(&mut self, value: Option<i64>)
pub fn set_tab_index(&mut self, value: Option<i64>)
Set the value of the tabindex attribute
sourcepub fn set_title(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_title(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the title attribute
sourcepub fn set_translate(&mut self, value: bool)
pub fn set_translate(&mut self, value: bool)
Set the value of the translate attribute
source§impl Heading2
impl Heading2
sourcepub fn children(&self) -> &[Heading2Child]
pub fn children(&self) -> &[Heading2Child]
Access the element’s children
sourcepub fn children_mut(&mut self) -> &mut Vec<Heading2Child>
pub fn children_mut(&mut self) -> &mut Vec<Heading2Child>
Mutably access the element’s children