Enum html2text::RenderNodeInfo

source ·
#[non_exhaustive]
pub enum RenderNodeInfo {
Show 28 variants Text(String), Container(Vec<RenderNode>), Link(String, Vec<RenderNode>), Em(Vec<RenderNode>), Strong(Vec<RenderNode>), Strikeout(Vec<RenderNode>), Code(Vec<RenderNode>), Img(String, String), Block(Vec<RenderNode>), Header(usize, Vec<RenderNode>), Div(Vec<RenderNode>), Pre(Vec<RenderNode>), BlockQuote(Vec<RenderNode>), Ul(Vec<RenderNode>), Ol(i64, Vec<RenderNode>), Dl(Vec<RenderNode>), Dt(Vec<RenderNode>), Dd(Vec<RenderNode>), Break, Table(RenderTable), TableBody(Vec<RenderTableRow>), TableRow(RenderTableRow, bool), TableCell(RenderTableCell), FragStart(String), Coloured(Colour, Vec<RenderNode>), BgColoured(Colour, Vec<RenderNode>), ListItem(Vec<RenderNode>), Sup(Vec<RenderNode>),
}
Expand description

The node-specific information distilled from the DOM.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Text(String)

Some text.

§

Container(Vec<RenderNode>)

A group of nodes collected together.

A link with contained nodes

§

Em(Vec<RenderNode>)

An emphasised region

§

Strong(Vec<RenderNode>)

A strong region

§

Strikeout(Vec<RenderNode>)

A struck out region

§

Code(Vec<RenderNode>)

A code region

§

Img(String, String)

An image (src, title)

§

Block(Vec<RenderNode>)

A block element with children

§

Header(usize, Vec<RenderNode>)

A header (h1, h2, …) with children

§

Div(Vec<RenderNode>)

A Div element with children

§

Pre(Vec<RenderNode>)

A preformatted region.

§

BlockQuote(Vec<RenderNode>)

A blockquote

§

Ul(Vec<RenderNode>)

An unordered list

§

Ol(i64, Vec<RenderNode>)

An ordered list

§

Dl(Vec<RenderNode>)

A description list (containing Dt or Dd)

§

Dt(Vec<RenderNode>)

A term (from a <dl>)

§

Dd(Vec<RenderNode>)

A definition (from a <dl>)

§

Break

A line break

§

Table(RenderTable)

A table

§

TableBody(Vec<RenderTableRow>)

A set of table rows (from either <thead> or <tbody>

§

TableRow(RenderTableRow, bool)

Table row (must only appear within a table body) If the boolean is true, then the cells are drawn vertically instead of horizontally (because of space).

§

TableCell(RenderTableCell)

Table cell (must only appear within a table row)

§

FragStart(String)

Start of a named HTML fragment

§

Coloured(Colour, Vec<RenderNode>)

A region with a foreground colour

§

BgColoured(Colour, Vec<RenderNode>)

A region with a background colour

§

ListItem(Vec<RenderNode>)

A list item

§

Sup(Vec<RenderNode>)

Superscript text

Trait Implementations§

source§

impl Clone for RenderNodeInfo

source§

fn clone(&self) -> RenderNodeInfo

Returns a copy 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 Debug for RenderNodeInfo

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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,

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.