#[non_exhaustive]pub struct Button { /* private fields */ }Expand description
The HTML <button> element
Implementations§
source§impl Button
impl Button
sourcepub fn set_disabled(&mut self, value: bool)
pub fn set_disabled(&mut self, value: bool)
Set the value of the disabled attribute
sourcepub fn set_form(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_form(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the form attribute
sourcepub fn form_action(&self) -> Option<&str>
pub fn form_action(&self) -> Option<&str>
Get the value of the formaction attribute
sourcepub fn set_form_action(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_form_action(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the formaction attribute
sourcepub fn form_enctype(&self) -> Option<&str>
pub fn form_enctype(&self) -> Option<&str>
Get the value of the formenctype attribute
sourcepub fn set_form_enctype(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_form_enctype(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the formenctype attribute
sourcepub fn form_method(&self) -> Option<&str>
pub fn form_method(&self) -> Option<&str>
Get the value of the formmethod attribute
sourcepub fn set_form_method(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_form_method(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the formmethod attribute
sourcepub fn form_no_validate(&self) -> bool
pub fn form_no_validate(&self) -> bool
Get the value of the formnovalidate attribute
sourcepub fn set_form_no_validate(&mut self, value: bool)
pub fn set_form_no_validate(&mut self, value: bool)
Set the value of the formnovalidate attribute
sourcepub fn form_target(&self) -> Option<&str>
pub fn form_target(&self) -> Option<&str>
Get the value of the formtarget attribute
sourcepub fn set_form_target(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_form_target(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the formtarget attribute
sourcepub fn set_name(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_name(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the name attribute
sourcepub fn popovertarget(&self) -> Option<&str>
pub fn popovertarget(&self) -> Option<&str>
Get the value of the popovertarget attribute
sourcepub fn set_popovertarget(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_popovertarget(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the popovertarget attribute
sourcepub fn popovertargetaction(&self) -> Option<&str>
pub fn popovertargetaction(&self) -> Option<&str>
Get the value of the popovertargetaction attribute
sourcepub fn set_popovertargetaction(
&mut self,
value: Option<impl Into<Cow<'static, str>>>
)
pub fn set_popovertargetaction( &mut self, value: Option<impl Into<Cow<'static, str>>> )
Set the value of the popovertargetaction attribute
sourcepub fn set_type_(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_type_(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the type attribute
sourcepub fn set_value(&mut self, value: Option<impl Into<Cow<'static, str>>>)
pub fn set_value(&mut self, value: Option<impl Into<Cow<'static, str>>>)
Set the value of the value 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 Button
impl Button
sourcepub fn children(&self) -> &[ButtonChild]
pub fn children(&self) -> &[ButtonChild]
Access the element’s children
sourcepub fn children_mut(&mut self) -> &mut Vec<ButtonChild>
pub fn children_mut(&mut self) -> &mut Vec<ButtonChild>
Mutably access the element’s children