Struct GlobalAttributes

Source
pub struct GlobalAttributes {
Show 28 fields pub access_key: Option<Cow<'static, str>>, pub auto_capitalize: Option<Cow<'static, str>>, pub autofocus: bool, pub class: Option<Cow<'static, str>>, pub content_editable: Option<Cow<'static, str>>, pub direction: Option<Cow<'static, str>>, pub draggable: bool, pub enter_key_hint: Option<Cow<'static, str>>, pub export_parts: Option<Cow<'static, str>>, pub hidden: Option<Cow<'static, str>>, pub id: Option<Cow<'static, str>>, pub inert: bool, pub input_mode: Option<Cow<'static, str>>, pub is_: Option<Cow<'static, str>>, pub item_id: Option<Cow<'static, str>>, pub item_prop: Option<Cow<'static, str>>, pub item_ref: Option<Cow<'static, str>>, pub item_scope: Option<Cow<'static, str>>, pub item_type: Option<Cow<'static, str>>, pub lang: Option<Cow<'static, str>>, pub nonce: Option<Cow<'static, str>>, pub part: Option<Cow<'static, str>>, pub slot: Option<Cow<'static, str>>, pub spellcheck: Option<Cow<'static, str>>, pub style: Option<Cow<'static, str>>, pub tab_index: Option<i64>, pub title: Option<Cow<'static, str>>, pub translate: bool,
}
Expand description

The “global attributes” struct

Fields§

§access_key: Option<Cow<'static, str>>

Provides a hint for generating a keyboard shortcut for the current element

§auto_capitalize: Option<Cow<'static, str>>

Controls whether and how text input is automatically capitalized as it is entered/edited by the user

§autofocus: bool

Indicates that an element should be focused on page load, or when the

that it is part of is displayed

§class: Option<Cow<'static, str>>

A space-separated list of the case-sensitive classes of the element

§content_editable: Option<Cow<'static, str>>

Indicates if the element should be editable by the user

§direction: Option<Cow<'static, str>>

Indicates the directionality of the element’s text

§draggable: bool

Indicates whether the element can be dragged, either with native browser behavior or the HTML Drag and Drop API.

§enter_key_hint: Option<Cow<'static, str>>

Defines what action label (or icon) to present for the enter key on virtual keyboards

§export_parts: Option<Cow<'static, str>>

The exportparts global attribute allows you to select and style elements existing in nested shadow trees, by exporting their part names

§hidden: Option<Cow<'static, str>>

Indicates that the browser should not render the contents of the element

§id: Option<Cow<'static, str>>

Defines an identifier (ID) which must be unique in the whole document

§inert: bool

indicating that the browser will ignore the element

§input_mode: Option<Cow<'static, str>>

hints at the type of data that might be entered by the user while editing the element or its contents

§is_: Option<Cow<'static, str>>

allows you to specify that a standard HTML element should behave like a defined custom built-in element

§item_id: Option<Cow<'static, str>>

The itemid global attribute provides microdata in the form of a unique, global identifier of an item

§item_prop: Option<Cow<'static, str>>

The itemprop global attribute is used to add properties to an item

§item_ref: Option<Cow<'static, str>>

Properties that are not descendants of an element with the itemscope attribute can be associated with an item using the global attribute itemref

§item_scope: Option<Cow<'static, str>>

itemscope is a boolean global attribute that defines the scope of associated metadata

§item_type: Option<Cow<'static, str>>

The global attribute itemtype specifies the URL of the vocabulary that will be used to define itemprop’s (item properties) in the data structure

§lang: Option<Cow<'static, str>>

The lang global attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be written in by the user

§nonce: Option<Cow<'static, str>>

The nonce global attribute is a content attribute defining a cryptographic nonce (“number used once”) which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed for a given element

§part: Option<Cow<'static, str>>

The part global attribute contains a space-separated list of the part names of the element

§slot: Option<Cow<'static, str>>

The slot global attribute assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the element whose name attribute’s value matches that slot attribute’s value

§spellcheck: Option<Cow<'static, str>>

The spellcheck global attribute is an enumerated attribute that defines whether the element may be checked for spelling errors

§style: Option<Cow<'static, str>>

The style global attribute contains CSS styling declarations to be applied to the element

§tab_index: Option<i64>

The tabindex global attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation

§title: Option<Cow<'static, str>>

The title global attribute contains text representing advisory information related to the element it belongs to

§translate: bool

The translate global attribute is an enumerated attribute that is used to specify whether an element’s translatable attribute values and its Text node children should be translated when the page is localized, or whether to leave them unchanged

Trait Implementations§

Source§

impl Clone for GlobalAttributes

Source§

fn clone(&self) -> GlobalAttributes

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalAttributes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalAttributes

Source§

fn default() -> GlobalAttributes

Returns the “default value” for a type. Read more
Source§

impl Display for GlobalAttributes

Source§

fn fmt(&self, writer: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GlobalAttributes

Source§

fn eq(&self, other: &GlobalAttributes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for GlobalAttributes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.