Node

Enum Node 

Source
pub enum Node<'a> {
Show 95 variants Text(Cow<'a, str>), Comment(Cow<'a, str>), A(A<'a>), Abbr(Abbr<'a>), Area(Area<'a>), Audio(Audio<'a>), B(B<'a>), Base(Base<'a>), Bdi(Bdi<'a>), Bdo(Bdo<'a>), Blockquote(Blockquote<'a>), Body(Body<'a>), Br(Br<'a>), Button(Button<'a>), Canvas(Canvas<'a>), Caption(Caption<'a>), Cite(Cite<'a>), Code(Code<'a>), Col(Col<'a>), Colgroup(Colgroup<'a>), Dd(Dd<'a>), Del(Del<'a>), Details(Details<'a>), Dfn(Dfn<'a>), Div(Div<'a>), Dl(Dl<'a>), Dt(Dt<'a>), Em(Em<'a>), Embed(Embed<'a>), Fieldset(Fieldset<'a>), Form(Form<'a>), H1(H1<'a>), H2(H2<'a>), H3(H3<'a>), H4(H4<'a>), H5(H5<'a>), H6(H6<'a>), Head(Head<'a>), Hr(Hr<'a>), Html(Html<'a>), I(I<'a>), Iframe(Iframe<'a>), Img(Img<'a>), Input(Input<'a>), Ins(Ins<'a>), Kbd(Kbd<'a>), Label(Label<'a>), Legend(Legend<'a>), Li(Li<'a>), Link(Link<'a>), Map(Map<'a>), Mark(Mark<'a>), Menu(Menu<'a>), Menuitem(Menuitem<'a>), Meta(Meta<'a>), Meter(Meter<'a>), Noscript(Noscript<'a>), Object(Object<'a>), Ol(Ol<'a>), Option(Option<'a>), Output(Output<'a>), P(P<'a>), Param(Param<'a>), Progress(Progress<'a>), Q(Q<'a>), Rp(Rp<'a>), Rt(Rt<'a>), Samp(Samp<'a>), Script(Script<'a>), Select(Select<'a>), Slot(Slot<'a>), Small(Small<'a>), Source(Source<'a>), Span(Span<'a>), Strong(Strong<'a>), Style(Style<'a>), Sub(Sub<'a>), Summary(Summary<'a>), Sup(Sup<'a>), Table(Table<'a>), Tbody(Tbody<'a>), Td(Td<'a>), Template(Template<'a>), Textarea(Textarea<'a>), Tfoot(Tfoot<'a>), Th(Th<'a>), Thead(Thead<'a>), Time(Time<'a>), Title(Title<'a>), Tr(Tr<'a>), Track(Track<'a>), Ul(Ul<'a>), Var(Var<'a>), Video(Video<'a>), Wbr(Wbr<'a>),
}
Expand description

An HTML node

Variants§

§

Text(Cow<'a, str>)

A text element

§

Comment(Cow<'a, str>)

A comment,

§

A(A<'a>)

§

Abbr(Abbr<'a>)

§

Area(Area<'a>)

§

Audio(Audio<'a>)

§

B(B<'a>)

§

Base(Base<'a>)

§

Bdi(Bdi<'a>)

§

Bdo(Bdo<'a>)

§

Blockquote(Blockquote<'a>)

§

Body(Body<'a>)

§

Br(Br<'a>)

§

Button(Button<'a>)

§

Canvas(Canvas<'a>)

§

Caption(Caption<'a>)

§

Cite(Cite<'a>)

§

Code(Code<'a>)

§

Col(Col<'a>)

§

Colgroup(Colgroup<'a>)

§

Dd(Dd<'a>)

§

Del(Del<'a>)

§

Details(Details<'a>)

§

Dfn(Dfn<'a>)

§

Div(Div<'a>)

§

Dl(Dl<'a>)

§

Dt(Dt<'a>)

§

Em(Em<'a>)

§

Embed(Embed<'a>)

§

Fieldset(Fieldset<'a>)

§

Form(Form<'a>)

§

H1(H1<'a>)

§

H2(H2<'a>)

§

H3(H3<'a>)

§

H4(H4<'a>)

§

H5(H5<'a>)

§

H6(H6<'a>)

§

Head(Head<'a>)

§

Hr(Hr<'a>)

§

Html(Html<'a>)

§

I(I<'a>)

§

Iframe(Iframe<'a>)

§

Img(Img<'a>)

§

Input(Input<'a>)

§

Ins(Ins<'a>)

§

Kbd(Kbd<'a>)

§

Label(Label<'a>)

§

Legend(Legend<'a>)

§

Li(Li<'a>)

§

Map(Map<'a>)

§

Mark(Mark<'a>)

§

Menu(Menu<'a>)

§

Menuitem(Menuitem<'a>)

§

Meta(Meta<'a>)

§

Meter(Meter<'a>)

§

Noscript(Noscript<'a>)

§

Object(Object<'a>)

§

Ol(Ol<'a>)

§

Option(Option<'a>)

§

Output(Output<'a>)

§

P(P<'a>)

§

Param(Param<'a>)

§

Progress(Progress<'a>)

§

Q(Q<'a>)

§

Rp(Rp<'a>)

§

Rt(Rt<'a>)

§

Samp(Samp<'a>)

§

Script(Script<'a>)

§

Select(Select<'a>)

§

Slot(Slot<'a>)

§

Small(Small<'a>)

§

Source(Source<'a>)

§

Span(Span<'a>)

§

Strong(Strong<'a>)

§

Style(Style<'a>)

§

Sub(Sub<'a>)

§

Summary(Summary<'a>)

§

Sup(Sup<'a>)

§

Table(Table<'a>)

§

Tbody(Tbody<'a>)

§

Td(Td<'a>)

§

Template(Template<'a>)

§

Textarea(Textarea<'a>)

§

Tfoot(Tfoot<'a>)

§

Th(Th<'a>)

§

Thead(Thead<'a>)

§

Time(Time<'a>)

§

Title(Title<'a>)

§

Tr(Tr<'a>)

§

Track(Track<'a>)

§

Ul(Ul<'a>)

§

Var(Var<'a>)

§

Video(Video<'a>)

§

Wbr(Wbr<'a>)

Trait Implementations§

Source§

impl<'a> Clone for Node<'a>

Source§

fn clone(&self) -> Node<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for Node<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Display for Node<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a String> for Node<'a>

Source§

fn from(text: &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for Node<'a>

Source§

fn from(text: &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<A<'a>> for Node<'a>

Source§

fn from(element: A<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Abbr<'a>> for Node<'a>

Source§

fn from(element: Abbr<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Area<'a>> for Node<'a>

Source§

fn from(element: Area<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Audio<'a>> for Node<'a>

Source§

fn from(element: Audio<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<B<'a>> for Node<'a>

Source§

fn from(element: B<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Base<'a>> for Node<'a>

Source§

fn from(element: Base<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Bdi<'a>> for Node<'a>

Source§

fn from(element: Bdi<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Bdo<'a>> for Node<'a>

Source§

fn from(element: Bdo<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Blockquote<'a>> for Node<'a>

Source§

fn from(element: Blockquote<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Body<'a>> for Node<'a>

Source§

fn from(element: Body<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Br<'a>> for Node<'a>

Source§

fn from(element: Br<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Button<'a>> for Node<'a>

Source§

fn from(element: Button<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Canvas<'a>> for Node<'a>

Source§

fn from(element: Canvas<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Caption<'a>> for Node<'a>

Source§

fn from(element: Caption<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Cite<'a>> for Node<'a>

Source§

fn from(element: Cite<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Code<'a>> for Node<'a>

Source§

fn from(element: Code<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Col<'a>> for Node<'a>

Source§

fn from(element: Col<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Colgroup<'a>> for Node<'a>

Source§

fn from(element: Colgroup<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<Comment<T>> for Node<'a>
where T: Into<Cow<'a, str>>,

Source§

fn from(comment: Comment<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Dd<'a>> for Node<'a>

Source§

fn from(element: Dd<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Del<'a>> for Node<'a>

Source§

fn from(element: Del<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Details<'a>> for Node<'a>

Source§

fn from(element: Details<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Dfn<'a>> for Node<'a>

Source§

fn from(element: Dfn<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Div<'a>> for Node<'a>

Source§

fn from(element: Div<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Dl<'a>> for Node<'a>

Source§

fn from(element: Dl<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Dt<'a>> for Node<'a>

Source§

fn from(element: Dt<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Em<'a>> for Node<'a>

Source§

fn from(element: Em<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Embed<'a>> for Node<'a>

Source§

fn from(element: Embed<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Fieldset<'a>> for Node<'a>

Source§

fn from(element: Fieldset<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Form<'a>> for Node<'a>

Source§

fn from(element: Form<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H1<'a>> for Node<'a>

Source§

fn from(element: H1<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H2<'a>> for Node<'a>

Source§

fn from(element: H2<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H3<'a>> for Node<'a>

Source§

fn from(element: H3<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H4<'a>> for Node<'a>

Source§

fn from(element: H4<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H5<'a>> for Node<'a>

Source§

fn from(element: H5<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<H6<'a>> for Node<'a>

Source§

fn from(element: H6<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Head<'a>> for Node<'a>

Source§

fn from(element: Head<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Hr<'a>> for Node<'a>

Source§

fn from(element: Hr<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Html<'a>> for Node<'a>

Source§

fn from(element: Html<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<I<'a>> for Node<'a>

Source§

fn from(element: I<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Iframe<'a>> for Node<'a>

Source§

fn from(element: Iframe<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Img<'a>> for Node<'a>

Source§

fn from(element: Img<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Input<'a>> for Node<'a>

Source§

fn from(element: Input<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Ins<'a>> for Node<'a>

Source§

fn from(element: Ins<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Kbd<'a>> for Node<'a>

Source§

fn from(element: Kbd<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Label<'a>> for Node<'a>

Source§

fn from(element: Label<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Legend<'a>> for Node<'a>

Source§

fn from(element: Legend<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Li<'a>> for Node<'a>

Source§

fn from(element: Li<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Link<'a>> for Node<'a>

Source§

fn from(element: Link<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Map<'a>> for Node<'a>

Source§

fn from(element: Map<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Mark<'a>> for Node<'a>

Source§

fn from(element: Mark<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Menu<'a>> for Node<'a>

Source§

fn from(element: Menu<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Menuitem<'a>> for Node<'a>

Source§

fn from(element: Menuitem<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Meta<'a>> for Node<'a>

Source§

fn from(element: Meta<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Meter<'a>> for Node<'a>

Source§

fn from(element: Meter<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Noscript<'a>> for Node<'a>

Source§

fn from(element: Noscript<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Object<'a>> for Node<'a>

Source§

fn from(element: Object<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Ol<'a>> for Node<'a>

Source§

fn from(element: Ol<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Option<'a>> for Node<'a>

Source§

fn from(element: Option<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Output<'a>> for Node<'a>

Source§

fn from(element: Output<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<P<'a>> for Node<'a>

Source§

fn from(element: P<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Param<'a>> for Node<'a>

Source§

fn from(element: Param<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Progress<'a>> for Node<'a>

Source§

fn from(element: Progress<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Q<'a>> for Node<'a>

Source§

fn from(element: Q<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Rp<'a>> for Node<'a>

Source§

fn from(element: Rp<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Rt<'a>> for Node<'a>

Source§

fn from(element: Rt<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Samp<'a>> for Node<'a>

Source§

fn from(element: Samp<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Script<'a>> for Node<'a>

Source§

fn from(element: Script<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Select<'a>> for Node<'a>

Source§

fn from(element: Select<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Slot<'a>> for Node<'a>

Source§

fn from(element: Slot<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Small<'a>> for Node<'a>

Source§

fn from(element: Small<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Source<'a>> for Node<'a>

Source§

fn from(element: Source<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Span<'a>> for Node<'a>

Source§

fn from(element: Span<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<String> for Node<'a>

Source§

fn from(text: String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Strong<'a>> for Node<'a>

Source§

fn from(element: Strong<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Style<'a>> for Node<'a>

Source§

fn from(element: Style<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Sub<'a>> for Node<'a>

Source§

fn from(element: Sub<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Summary<'a>> for Node<'a>

Source§

fn from(element: Summary<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Sup<'a>> for Node<'a>

Source§

fn from(element: Sup<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Table<'a>> for Node<'a>

Source§

fn from(element: Table<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Tbody<'a>> for Node<'a>

Source§

fn from(element: Tbody<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Td<'a>> for Node<'a>

Source§

fn from(element: Td<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Template<'a>> for Node<'a>

Source§

fn from(element: Template<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Textarea<'a>> for Node<'a>

Source§

fn from(element: Textarea<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Tfoot<'a>> for Node<'a>

Source§

fn from(element: Tfoot<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Th<'a>> for Node<'a>

Source§

fn from(element: Th<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Thead<'a>> for Node<'a>

Source§

fn from(element: Thead<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Time<'a>> for Node<'a>

Source§

fn from(element: Time<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Title<'a>> for Node<'a>

Source§

fn from(element: Title<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Tr<'a>> for Node<'a>

Source§

fn from(element: Tr<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Track<'a>> for Node<'a>

Source§

fn from(element: Track<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Ul<'a>> for Node<'a>

Source§

fn from(element: Ul<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Var<'a>> for Node<'a>

Source§

fn from(element: Var<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Video<'a>> for Node<'a>

Source§

fn from(element: Video<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Wbr<'a>> for Node<'a>

Source§

fn from(element: Wbr<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for Node<'a>

§

impl<'a> RefUnwindSafe for Node<'a>

§

impl<'a> Send for Node<'a>

§

impl<'a> Sync for Node<'a>

§

impl<'a> Unpin for Node<'a>

§

impl<'a> UnwindSafe for Node<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'a, E, D> ElementData<E> for D
where E: Element<'a>, D: Into<Node<'a>>,

Source§

fn add_to(self, elem: &mut E)

Add this data to the given element
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.