html_dsl/types/html/head
Types
Functions
pub fn charset(root: Head, set: String) -> Head
This creates a string that represents a meta charset
@paramcharset: the intended charset@return: A Head
pub fn end(root: Head) -> Head
Ends a head context
@paramroot: The head to end@returns: A Head
pub fn head_to_string(head: Head) -> String
This function converts a Head to a string
@paramhead: The head to convert@returns: A string
pub fn link(
root: Head,
rel: String,
href: String,
attributes: Option(Attribute),
) -> Head
This creates a string that represents a link element
@paramrel: The relationship of the link@paramhref: The href of the link@paramattributes: The attributes of the link@returns: A Head
pub fn meta(root: Head, name: String, content: String) -> Head
This creates a string that represents a meta element
@paramname: The name of the meta@paramcontent: The content of the meta@returns: A Head
pub fn resolve(head: Head) -> Result(String, String)
This function resolves a Head to a string or an error
@paramhead: The head to resolve@returns: A Result
pub fn script(root: Head, src: String) -> Head
This creates a string that represents a script element
@paramsrc: The source of the script@returns: A Head
pub fn style(root: Head, src: String) -> Head
This creates a string that represents a special link element for stylesheets
@paramsrc: The source of the stylesheet@returns: A Head