Enum rtdlib::types::PageBlock[][src]

pub enum PageBlock {
Show 28 variants Anchor(PageBlockAnchor), Animation(PageBlockAnimation), Audio(PageBlockAudio), AuthorDate(PageBlockAuthorDate), BlockQuote(PageBlockBlockQuote), ChatLink(PageBlockChatLink), Collage(PageBlockCollage), Cover(PageBlockCover), Details(PageBlockDetails), Divider(PageBlockDivider), Embedded(PageBlockEmbedded), EmbeddedPost(PageBlockEmbeddedPost), Footer(PageBlockFooter), Header(PageBlockHeader), Kicker(PageBlockKicker), List(PageBlockList), Map(PageBlockMap), Paragraph(PageBlockParagraph), Photo(PageBlockPhoto), Preformatted(PageBlockPreformatted), PullQuote(PageBlockPullQuote), RelatedArticles(PageBlockRelatedArticles), Slideshow(PageBlockSlideshow), Subheader(PageBlockSubheader), Subtitle(PageBlockSubtitle), Table(PageBlockTable), Title(PageBlockTitle), Video(PageBlockVideo), // some variants omitted
}
Expand description

Describes a block of an instant view web page

Variants

Anchor

An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor

Tuple Fields of Anchor

0: PageBlockAnchor
Animation

An animation

Tuple Fields of Animation

0: PageBlockAnimation
Audio

An audio file

Tuple Fields of Audio

0: PageBlockAudio
AuthorDate

The author and publishing date of a page

Tuple Fields of AuthorDate

0: PageBlockAuthorDate
BlockQuote

A block quote

Tuple Fields of BlockQuote

0: PageBlockBlockQuote

A link to a chat

Tuple Fields of ChatLink

0: PageBlockChatLink
Collage

A collage

Tuple Fields of Collage

0: PageBlockCollage
Cover

A page cover

Tuple Fields of Cover

0: PageBlockCover
Details

A collapsible block

Tuple Fields of Details

0: PageBlockDetails
Divider

An empty block separating a page

Tuple Fields of Divider

0: PageBlockDivider
Embedded

An embedded web page

Tuple Fields of Embedded

0: PageBlockEmbedded
EmbeddedPost

An embedded post

Tuple Fields of EmbeddedPost

0: PageBlockEmbeddedPost
Footer

The footer of a page

Tuple Fields of Footer

0: PageBlockFooter
Header

A header

Tuple Fields of Header

0: PageBlockHeader
Kicker

A kicker

Tuple Fields of Kicker

0: PageBlockKicker
List

A list of data blocks

Tuple Fields of List

0: PageBlockList
Map

A map

Tuple Fields of Map

0: PageBlockMap
Paragraph

A text paragraph

Tuple Fields of Paragraph

0: PageBlockParagraph
Photo

A photo

Tuple Fields of Photo

0: PageBlockPhoto
Preformatted

A preformatted text paragraph

Tuple Fields of Preformatted

0: PageBlockPreformatted
PullQuote

A pull quote

Tuple Fields of PullQuote

0: PageBlockPullQuote
RelatedArticles

Related articles

Tuple Fields of RelatedArticles

0: PageBlockRelatedArticles
Slideshow

A slideshow

Tuple Fields of Slideshow

0: PageBlockSlideshow
Subheader

A subheader

Tuple Fields of Subheader

0: PageBlockSubheader
Subtitle

The subtitle of a page

Tuple Fields of Subtitle

0: PageBlockSubtitle
Table

A table

Tuple Fields of Table

0: PageBlockTable
Title

The title of a page

Tuple Fields of Title

0: PageBlockTitle
Video

A video

Tuple Fields of Video

0: PageBlockVideo

Implementations

pub fn is_embedded_post(&self) -> bool

pub fn on_embedded_post<F: FnOnce(&PageBlockEmbeddedPost)>(
    &self,
    fnc: F
) -> &Self

pub fn as_embedded_post(&self) -> Option<&PageBlockEmbeddedPost>

pub fn embedded_post<T: AsRef<PageBlockEmbeddedPost>>(t: T) -> Self

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Return td type to json string

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.