Trait html_node::typed::TypedElement
source · pub trait TypedElement: Default {
type Attributes;
const NAME: &'static str;
// Required methods
fn from_attributes(
attributes: Self::Attributes,
data_attributes: Vec<(String, Option<String>), Global>,
aria_attributes: Vec<(String, Option<String>), Global>
) -> Self;
fn into_element(self, children: Option<Vec<Node, Global>>) -> Element;
// Provided method
fn into_node(self, children: Option<Vec<Node, Global>>) -> Node { ... }
}
Expand description
A typed HTML element.
Required Associated Types§
sourcetype Attributes
type Attributes
The attributes of the element.
Required Associated Constants§
Required Methods§
Provided Methods§
sourcefn into_node(self, children: Option<Vec<Node, Global>>) -> Node
fn into_node(self, children: Option<Vec<Node, Global>>) -> Node
Convert the typed element into a Node
.
By default, this is equivalent to calling TypedElement::into_element
and then just wrapping it in a Node::Element
.