pub enum PageBlock {
Show 29 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), VoiceNote(PageBlockVoiceNote), // some variants omitted
}
Expand description

Describes a block of an instant view web page

Variants

Anchor(PageBlockAnchor)

Tuple Fields

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

Animation(PageBlockAnimation)

Tuple Fields

An animation

Audio(PageBlockAudio)

Tuple Fields

An audio file

AuthorDate(PageBlockAuthorDate)

Tuple Fields

The author and publishing date of a page

BlockQuote(PageBlockBlockQuote)

Tuple Fields

A block quote

Tuple Fields

A link to a chat

Collage(PageBlockCollage)

Tuple Fields

A collage

Cover(PageBlockCover)

Tuple Fields

A page cover

Details(PageBlockDetails)

Tuple Fields

A collapsible block

Divider(PageBlockDivider)

Tuple Fields

An empty block separating a page

Embedded(PageBlockEmbedded)

Tuple Fields

An embedded web page

EmbeddedPost(PageBlockEmbeddedPost)

Tuple Fields

An embedded post

Footer(PageBlockFooter)

Tuple Fields

The footer of a page

Header(PageBlockHeader)

Tuple Fields

A header

Kicker(PageBlockKicker)

Tuple Fields

A kicker

List(PageBlockList)

Tuple Fields

A list of data blocks

Map(PageBlockMap)

Tuple Fields

A map

Paragraph(PageBlockParagraph)

Tuple Fields

A text paragraph

Photo(PageBlockPhoto)

Tuple Fields

A photo

Preformatted(PageBlockPreformatted)

Tuple Fields

A preformatted text paragraph

PullQuote(PageBlockPullQuote)

Tuple Fields

A pull quote

RelatedArticles(PageBlockRelatedArticles)

Tuple Fields

Related articles

Slideshow(PageBlockSlideshow)

Tuple Fields

A slideshow

Subheader(PageBlockSubheader)

Tuple Fields

A subheader

Subtitle(PageBlockSubtitle)

Tuple Fields

The subtitle of a page

Table(PageBlockTable)

Tuple Fields

A table

Title(PageBlockTitle)

Tuple Fields

The title of a page

Video(PageBlockVideo)

Tuple Fields

A video

VoiceNote(PageBlockVoiceNote)

Tuple Fields

A voice note

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)

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.