Module attr

Source
Expand description

Common attributes

Note that you may create your own attribute by using Attribute::new or Attribute::new_flag Or by leveraging on of the From implementation on Attribute

Enums§

AnchorTarget
Represent an anchor target

Functions§

action
action attribute
alt
alt attribute
async_
async attribute
autocomplete
autocomplete attribute
autocomplete_off
autocomplete="on" attribute
autocomplete_on
autocomplete="on" attribute
autofocus
autofocus attribute
charset
charset attribute
charset_utf8
Alias for charset("UTF-8")
charset_utf_8Deprecated
Alias for charset("UTF-8")
class
class attribute
cols
cols attribute
content
content attribute
crossorigin_anonymous
crossorigin="anonymous"
crossorigin_use_credentials
crossorigin="use-credentials"
defer
defer attribute
disabled
disabled attribute
download
download flag attribute
download_with_name
download attribute with a file name argument
for_
for attribute
height
height attribute
height_int
height attribute with an i32 value
href
href attribute
id
id attribute
integrity
integrity attribute
lang
lang attribute (usually on html element)
max
max attribute
maxlength
maxlength attribute
maxlength_u16
maxlength attribute using a u16 value
method_get
method_get attribute
method_post
method_get attribute
min
min attribute
minlength
minlength attribute
minlength_u16
minlength attribute using a u16 value
multiple
multiple attribute
name
name attribute
none
Do not render any attribute. Useful for conditional rendering.
pattern
pattern attribute
placeholder
placeholder attribute
rel
rel attribute
required
required attribute
role_str
role attribute with an aribtrary string value
rows
rows attribute
src
src attribute
style
style attribute
target
target attribute for <a>
target_blank
Alias for target(Target::Blank)
type_
type attribute
type_checkbox
type="checkbox" (checkbox input)
type_date
type="date" (date input)
type_email
type="email" (email input)
type_file
type="file" (file input)
type_hidden
type="hidden" (hidden input)
type_month
type="month" (month input)
type_number
type="number" (number input)
type_password
type="password" (password input)
type_radio
type="radio" (radio input)
type_range
type="range" (range input)
type_reset
type="reset" (reset button)
type_submit
type="submit" (reset button)
type_tel
type="tel" (phone number input)
type_text
type="text" (text input)
value
value attribute
width
width attribute
width_int
width attribute with an i32 value