Skip to main content

FromNode

Trait FromNode 

Source
pub trait FromNode<'tree>: Sized {
    // Required method
    fn from_node(
        node: Node<'tree>,
        src: &'tree [u8],
    ) -> Result<Self, ParseError>;
}
Expand description

Every generated struct and enum implements this.

Required Methods§

Source

fn from_node(node: Node<'tree>, src: &'tree [u8]) -> Result<Self, ParseError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tree> FromNode<'tree> for AttributeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for DocumentChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ElementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ScriptElementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for SelfClosingTagChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StartTagChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StyleElementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for Attribute<'tree>

Source§

impl<'tree> FromNode<'tree> for AttributeName<'tree>

Source§

impl<'tree> FromNode<'tree> for AttributeValue<'tree>

Source§

impl<'tree> FromNode<'tree> for Comment<'tree>

Source§

impl<'tree> FromNode<'tree> for Doctype<'tree>

Source§

impl<'tree> FromNode<'tree> for Document<'tree>

Source§

impl<'tree> FromNode<'tree> for Element<'tree>

Source§

impl<'tree> FromNode<'tree> for EndTag<'tree>

Source§

impl<'tree> FromNode<'tree> for Entity<'tree>

Source§

impl<'tree> FromNode<'tree> for ErroneousEndTag<'tree>

Source§

impl<'tree> FromNode<'tree> for ErroneousEndTagName<'tree>

Source§

impl<'tree> FromNode<'tree> for QuotedAttributeValue<'tree>

Source§

impl<'tree> FromNode<'tree> for RawText<'tree>

Source§

impl<'tree> FromNode<'tree> for ScriptElement<'tree>

Source§

impl<'tree> FromNode<'tree> for SelfClosingTag<'tree>

Source§

impl<'tree> FromNode<'tree> for StartTag<'tree>

Source§

impl<'tree> FromNode<'tree> for StyleElement<'tree>

Source§

impl<'tree> FromNode<'tree> for TagName<'tree>

Source§

impl<'tree> FromNode<'tree> for Text<'tree>