html_dsl/types/attribute
Types
Functions
pub fn add(
root: Option(Attribute),
key: String,
value: String,
) -> Option(Attribute)
Adds an attribute to an attribute
@paramroot: The root attribute@paramkey: The key of the attribute@paramvalue: The value of the attribute@returns: An Attribute
pub fn attribute_to_string(
attribute: Option(Attribute),
) -> String
This function is used to convert an attribute to a string
@paramattribute: The attribute to convert@returns: String
pub fn class(
root: Option(Attribute),
classes: String,
) -> Option(Attribute)
Shortcut for creating a class attribute
@paramroot: The root attribute@paramclasses: The classes to add@returns: An Attribute
pub fn id(
root: Option(Attribute),
id: String,
) -> Option(Attribute)
Shortcut for creating a id attribute
@paramroot: The root attribute@paramid: The id to add@returns: An Attribute