Enum pandoc_ast::Block

source ·
pub enum Block {
Show 15 variants Plain(Vec<Inline>), Para(Vec<Inline>), LineBlock(Vec<Vec<Inline>>), CodeBlock(Attr, String), RawBlock(Format, String), BlockQuote(Vec<Block>), OrderedList(ListAttributes, Vec<Vec<Block>>), BulletList(Vec<Vec<Block>>), DefinitionList(Vec<(Vec<Inline>, Vec<Vec<Block>>)>), Figure(Attr, Caption, Vec<Block>), Header(Int, Attr, Vec<Inline>), HorizontalRule, Table(Attr, Caption, Vec<ColSpec>, TableHead, Vec<TableBody>, TableFoot), Div(Attr, Vec<Block>), Null,
}
Expand description

Structured text like tables and lists

Variants§

§

Plain(Vec<Inline>)

Plain text, not a paragraph

§

Para(Vec<Inline>)

Paragraph

§

LineBlock(Vec<Vec<Inline>>)

Multiple non-breaking lines

§

CodeBlock(Attr, String)

Code block (literal) with attributes

§

RawBlock(Format, String)

§

BlockQuote(Vec<Block>)

Block quote (list of blocks)

§

OrderedList(ListAttributes, Vec<Vec<Block>>)

Ordered list (attributes and a list of items, each a list of blocks)

§

BulletList(Vec<Vec<Block>>)

Bullet list (list of items, each a list of blocks)

§

DefinitionList(Vec<(Vec<Inline>, Vec<Vec<Block>>)>)

Definition list Each list item is a pair consisting of a term (a list of inlines) and one or more definitions (each a list of blocks)

§

Figure(Attr, Caption, Vec<Block>)

Figure, with attributes, caption, list of blocks

§

Header(Int, Attr, Vec<Inline>)

Header - level (integer) and text (inlines)

§

HorizontalRule

§

Table(Attr, Caption, Vec<ColSpec>, TableHead, Vec<TableBody>, TableFoot)

Table, with attributes, caption, column alignments + widths column headers (each a list of rows), body and foot

§

Div(Attr, Vec<Block>)

Generic block container with attributes

§

Null

Nothing

Trait Implementations§

source§

impl Clone for Block

source§

fn clone(&self) -> Block

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 Block

source§

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

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

impl<'de> Deserialize<'de> for Block

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Block

source§

fn eq(&self, other: &Block) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Block

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Block

Auto Trait Implementations§

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,