pub trait TypedElement: Default {
    type Attributes: TypedAttributes;

    const NAME: &'static str;

    // Required methods
    fn from_attributes(
        attributes: Self::Attributes,
        other_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 { ... }
}
Available on crate feature typed only.
Expand description

A typed HTML element.

Required Associated Types§

source

type Attributes: TypedAttributes

The attributes of the element.

Required Associated Constants§

source

const NAME: &'static str

The name of the element.

Required Methods§

source

fn from_attributes( attributes: Self::Attributes, other_attributes: Vec<(String, Option<String>), Global> ) -> Self

Create an element from its attributes.

source

fn into_element(self, children: Option<Vec<Node, Global>>) -> Element

Convert the typed element into an Element.

Provided Methods§

source

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.

Implementors§

source§

impl TypedElement for a

source§

const NAME: &'static str = "a"

§

type Attributes = AAttributes

source§

impl TypedElement for abbr

source§

const NAME: &'static str = "abbr"

§

type Attributes = AbbrAttributes

source§

impl TypedElement for address

source§

const NAME: &'static str = "address"

§

type Attributes = AddressAttributes

source§

impl TypedElement for area

source§

const NAME: &'static str = "area"

§

type Attributes = AreaAttributes

source§

impl TypedElement for article

source§

const NAME: &'static str = "article"

§

type Attributes = ArticleAttributes

source§

impl TypedElement for aside

source§

const NAME: &'static str = "aside"

§

type Attributes = AsideAttributes

source§

impl TypedElement for audio

source§

const NAME: &'static str = "audio"

§

type Attributes = AudioAttributes

source§

impl TypedElement for b

source§

const NAME: &'static str = "b"

§

type Attributes = BAttributes

source§

impl TypedElement for base

source§

const NAME: &'static str = "base"

§

type Attributes = BaseAttributes

source§

impl TypedElement for bdi

source§

const NAME: &'static str = "bdi"

§

type Attributes = BdiAttributes

source§

impl TypedElement for bdo

source§

const NAME: &'static str = "bdo"

§

type Attributes = BdoAttributes

source§

impl TypedElement for blockquote

source§

const NAME: &'static str = "blockquote"

§

type Attributes = BlockquoteAttributes

source§

impl TypedElement for body

source§

const NAME: &'static str = "body"

§

type Attributes = BodyAttributes

source§

impl TypedElement for br

source§

const NAME: &'static str = "br"

§

type Attributes = BrAttributes

source§

impl TypedElement for button

source§

const NAME: &'static str = "button"

§

type Attributes = ButtonAttributes

source§

impl TypedElement for canvas

source§

const NAME: &'static str = "canvas"

§

type Attributes = CanvasAttributes

source§

impl TypedElement for caption

source§

const NAME: &'static str = "caption"

§

type Attributes = CaptionAttributes

source§

impl TypedElement for cite

source§

const NAME: &'static str = "cite"

§

type Attributes = CiteAttributes

source§

impl TypedElement for code

source§

const NAME: &'static str = "code"

§

type Attributes = CodeAttributes

source§

impl TypedElement for col

source§

const NAME: &'static str = "col"

§

type Attributes = ColAttributes

source§

impl TypedElement for colgroup

source§

const NAME: &'static str = "colgroup"

§

type Attributes = ColgroupAttributes

source§

impl TypedElement for data

source§

const NAME: &'static str = "data"

§

type Attributes = DataAttributes

source§

impl TypedElement for datalist

source§

const NAME: &'static str = "datalist"

§

type Attributes = DatalistAttributes

source§

impl TypedElement for dd

source§

const NAME: &'static str = "dd"

§

type Attributes = DdAttributes

source§

impl TypedElement for del

source§

const NAME: &'static str = "del"

§

type Attributes = DelAttributes

source§

impl TypedElement for details

source§

const NAME: &'static str = "details"

§

type Attributes = DetailsAttributes

source§

impl TypedElement for dfn

source§

const NAME: &'static str = "dfn"

§

type Attributes = DfnAttributes

source§

impl TypedElement for dialog

source§

const NAME: &'static str = "dialog"

§

type Attributes = DialogAttributes

source§

impl TypedElement for div

source§

const NAME: &'static str = "div"

§

type Attributes = DivAttributes

source§

impl TypedElement for dl

source§

const NAME: &'static str = "dl"

§

type Attributes = DlAttributes

source§

impl TypedElement for dt

source§

const NAME: &'static str = "dt"

§

type Attributes = DtAttributes

source§

impl TypedElement for em

source§

const NAME: &'static str = "em"

§

type Attributes = EmAttributes

source§

impl TypedElement for embed

source§

const NAME: &'static str = "embed"

§

type Attributes = EmbedAttributes

source§

impl TypedElement for fieldset

source§

const NAME: &'static str = "fieldset"

§

type Attributes = FieldsetAttributes

source§

impl TypedElement for figcaption

source§

const NAME: &'static str = "figcaption"

§

type Attributes = FigcaptionAttributes

source§

impl TypedElement for figure

source§

const NAME: &'static str = "figure"

§

type Attributes = FigureAttributes

source§

const NAME: &'static str = "footer"

§

type Attributes = FooterAttributes

source§

impl TypedElement for form

source§

const NAME: &'static str = "form"

§

type Attributes = FormAttributes

source§

impl TypedElement for h1

source§

const NAME: &'static str = "h1"

§

type Attributes = H1Attributes

source§

impl TypedElement for h2

source§

const NAME: &'static str = "h2"

§

type Attributes = H2Attributes

source§

impl TypedElement for h3

source§

const NAME: &'static str = "h3"

§

type Attributes = H3Attributes

source§

impl TypedElement for h4

source§

const NAME: &'static str = "h4"

§

type Attributes = H4Attributes

source§

impl TypedElement for h5

source§

const NAME: &'static str = "h5"

§

type Attributes = H5Attributes

source§

impl TypedElement for h6

source§

const NAME: &'static str = "h6"

§

type Attributes = H6Attributes

source§

impl TypedElement for head

source§

const NAME: &'static str = "head"

§

type Attributes = HeadAttributes

source§

impl TypedElement for header

source§

const NAME: &'static str = "header"

§

type Attributes = HeaderAttributes

source§

impl TypedElement for hgroup

source§

const NAME: &'static str = "hgroup"

§

type Attributes = HgroupAttributes

source§

impl TypedElement for hr

source§

const NAME: &'static str = "hr"

§

type Attributes = HrAttributes

source§

impl TypedElement for html

source§

const NAME: &'static str = "html"

§

type Attributes = HtmlAttributes

source§

impl TypedElement for i

source§

const NAME: &'static str = "i"

§

type Attributes = IAttributes

source§

impl TypedElement for iframe

source§

const NAME: &'static str = "iframe"

§

type Attributes = IframeAttributes

source§

impl TypedElement for img

source§

const NAME: &'static str = "img"

§

type Attributes = ImgAttributes

source§

impl TypedElement for input

source§

const NAME: &'static str = "input"

§

type Attributes = InputAttributes

source§

impl TypedElement for ins

source§

const NAME: &'static str = "ins"

§

type Attributes = InsAttributes

source§

impl TypedElement for kbd

source§

const NAME: &'static str = "kbd"

§

type Attributes = KbdAttributes

source§

impl TypedElement for label

source§

const NAME: &'static str = "label"

§

type Attributes = LabelAttributes

source§

impl TypedElement for legend

source§

const NAME: &'static str = "legend"

§

type Attributes = LegendAttributes

source§

impl TypedElement for li

source§

const NAME: &'static str = "li"

§

type Attributes = LiAttributes

source§

const NAME: &'static str = "link"

§

type Attributes = LinkAttributes

source§

impl TypedElement for main

source§

const NAME: &'static str = "main"

§

type Attributes = MainAttributes

source§

impl TypedElement for map

source§

const NAME: &'static str = "map"

§

type Attributes = MapAttributes

source§

impl TypedElement for mark

source§

const NAME: &'static str = "mark"

§

type Attributes = MarkAttributes

source§

impl TypedElement for math

source§

const NAME: &'static str = "math"

§

type Attributes = MathAttributes

source§

impl TypedElement for menu

source§

const NAME: &'static str = "menu"

§

type Attributes = MenuAttributes

source§

impl TypedElement for meta

source§

const NAME: &'static str = "meta"

§

type Attributes = MetaAttributes

source§

impl TypedElement for meter

source§

const NAME: &'static str = "meter"

§

type Attributes = MeterAttributes

source§

impl TypedElement for nav

source§

const NAME: &'static str = "nav"

§

type Attributes = NavAttributes

source§

impl TypedElement for noscript

source§

const NAME: &'static str = "noscript"

§

type Attributes = NoscriptAttributes

source§

impl TypedElement for object

source§

const NAME: &'static str = "object"

§

type Attributes = ObjectAttributes

source§

impl TypedElement for ol

source§

const NAME: &'static str = "ol"

§

type Attributes = OlAttributes

source§

impl TypedElement for optgroup

source§

const NAME: &'static str = "optgroup"

§

type Attributes = OptgroupAttributes

source§

impl TypedElement for option

source§

const NAME: &'static str = "option"

§

type Attributes = OptionAttributes

source§

impl TypedElement for output

source§

const NAME: &'static str = "output"

§

type Attributes = OutputAttributes

source§

impl TypedElement for p

source§

const NAME: &'static str = "p"

§

type Attributes = PAttributes

source§

impl TypedElement for picture

source§

const NAME: &'static str = "picture"

§

type Attributes = PictureAttributes

source§

impl TypedElement for portal

source§

const NAME: &'static str = "portal"

§

type Attributes = PortalAttributes

source§

impl TypedElement for pre

source§

const NAME: &'static str = "pre"

§

type Attributes = PreAttributes

source§

impl TypedElement for progress

source§

const NAME: &'static str = "progress"

§

type Attributes = ProgressAttributes

source§

impl TypedElement for q

source§

const NAME: &'static str = "q"

§

type Attributes = QAttributes

source§

impl TypedElement for rp

source§

const NAME: &'static str = "rp"

§

type Attributes = RpAttributes

source§

impl TypedElement for rt

source§

const NAME: &'static str = "rt"

§

type Attributes = RtAttributes

source§

impl TypedElement for ruby

source§

const NAME: &'static str = "ruby"

§

type Attributes = RubyAttributes

source§

impl TypedElement for s

source§

const NAME: &'static str = "s"

§

type Attributes = SAttributes

source§

impl TypedElement for samp

source§

const NAME: &'static str = "samp"

§

type Attributes = SampAttributes

source§

impl TypedElement for script

source§

const NAME: &'static str = "script"

§

type Attributes = ScriptAttributes

source§

const NAME: &'static str = "search"

§

type Attributes = SearchAttributes

source§

impl TypedElement for section

source§

const NAME: &'static str = "section"

§

type Attributes = SectionAttributes

source§

impl TypedElement for select

source§

const NAME: &'static str = "select"

§

type Attributes = SelectAttributes

source§

impl TypedElement for slot

source§

const NAME: &'static str = "slot"

§

type Attributes = SlotAttributes

source§

impl TypedElement for small

source§

const NAME: &'static str = "small"

§

type Attributes = SmallAttributes

source§

impl TypedElement for source

source§

const NAME: &'static str = "source"

§

type Attributes = SourceAttributes

source§

impl TypedElement for span

source§

const NAME: &'static str = "span"

§

type Attributes = SpanAttributes

source§

impl TypedElement for strong

source§

const NAME: &'static str = "strong"

§

type Attributes = StrongAttributes

source§

impl TypedElement for style

source§

const NAME: &'static str = "style"

§

type Attributes = StyleAttributes

source§

impl TypedElement for sub

source§

const NAME: &'static str = "sub"

§

type Attributes = SubAttributes

source§

impl TypedElement for sup

source§

const NAME: &'static str = "sup"

§

type Attributes = SupAttributes

source§

impl TypedElement for svg

source§

const NAME: &'static str = "svg"

§

type Attributes = SvgAttributes

source§

impl TypedElement for table

source§

const NAME: &'static str = "table"

§

type Attributes = TableAttributes

source§

impl TypedElement for tbody

source§

const NAME: &'static str = "tbody"

§

type Attributes = TbodyAttributes

source§

impl TypedElement for td

source§

const NAME: &'static str = "td"

§

type Attributes = TdAttributes

source§

impl TypedElement for template

source§

const NAME: &'static str = "template"

§

type Attributes = TemplateAttributes

source§

impl TypedElement for textarea

source§

const NAME: &'static str = "textarea"

§

type Attributes = TextareaAttributes

source§

impl TypedElement for tfoot

source§

const NAME: &'static str = "tfoot"

§

type Attributes = TfootAttributes

source§

impl TypedElement for th

source§

const NAME: &'static str = "th"

§

type Attributes = ThAttributes

source§

impl TypedElement for thead

source§

const NAME: &'static str = "thead"

§

type Attributes = TheadAttributes

source§

impl TypedElement for time

source§

const NAME: &'static str = "time"

§

type Attributes = TimeAttributes

source§

impl TypedElement for title

source§

const NAME: &'static str = "title"

§

type Attributes = TitleAttributes

source§

impl TypedElement for tr

source§

const NAME: &'static str = "tr"

§

type Attributes = TrAttributes

source§

impl TypedElement for track

source§

const NAME: &'static str = "track"

§

type Attributes = TrackAttributes

source§

impl TypedElement for u

source§

const NAME: &'static str = "u"

§

type Attributes = UAttributes

source§

impl TypedElement for ul

source§

const NAME: &'static str = "ul"

§

type Attributes = UlAttributes

source§

impl TypedElement for var

source§

const NAME: &'static str = "var"

§

type Attributes = VarAttributes

source§

impl TypedElement for video

source§

const NAME: &'static str = "video"

§

type Attributes = VideoAttributes

source§

impl TypedElement for wbr

source§

const NAME: &'static str = "wbr"

§

type Attributes = WbrAttributes