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".

Implementors§

Source§

impl<'tree> FromNode<'tree> for Array<'tree>

Source§

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

Source§

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

Source§

impl<'tree> FromNode<'tree> for EscapeSequence<'tree>

Source§

impl<'tree> FromNode<'tree> for False<'tree>

Source§

impl<'tree> FromNode<'tree> for Null<'tree>

Source§

impl<'tree> FromNode<'tree> for Number<'tree>

Source§

impl<'tree> FromNode<'tree> for Object<'tree>

Source§

impl<'tree> FromNode<'tree> for Pair<'tree>

Source§

impl<'tree> FromNode<'tree> for String<'tree>

Source§

impl<'tree> FromNode<'tree> for StringChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StringContent<'tree>

Source§

impl<'tree> FromNode<'tree> for True<'tree>

Source§

impl<'tree> FromNode<'tree> for Value<'tree>