[][src]Enum ftml::Paragraph

pub enum Paragraph<'a> {
    Align {
        alignment: Alignment,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Center {
        words: Vec<Word<'a>>,
    },
    ClearFloat {
        direction: Option<Alignment>,
    },
    CodeBlock {
        language: Option<Cow<'a, str>>,
        contents: &'a str,
    },
    Collapsible {
        show_text: Option<Cow<'a, str>>,
        hide_text: Option<Cow<'a, str>>,
        id: Option<Cow<'a, str>>,
        class: Option<Cow<'a, str>>,
        style: Option<Cow<'a, str>>,
        show_top: bool,
        show_bottom: bool,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Div {
        id: Option<Cow<'a, str>>,
        class: Option<Cow<'a, str>>,
        style: Option<Cow<'a, str>>,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Heading {
        level: HeadingLevel,
        words: Vec<Word<'a>>,
    },
    HorizontalLine,
    Html {
        contents: &'a str,
    },
    Iframe {
        url: &'a str,
        arguments: HashMap<&'a str, Cow<'a, str>>,
    },
    IfTags {
        required: Vec<&'a str>,
        prohibited: Vec<&'a str>,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Javascript {
        contents: &'a str,
    },
    List {
        style: ListStyle,
        depth: usize,
        items: Vec<Paragraph<'a>>,
    },
    Math {
        label: Option<&'a str>,
        id: Option<&'a str>,
        latex_env: Option<&'a str>,
        expr: &'a str,
    },
    Newlines {
        count: usize,
    },
    Table {
        rows: Vec<TableRow<'a>>,
    },
    TableOfContents {},
    QuoteBlock {
        id: Option<Cow<'a, str>>,
        class: Option<Cow<'a, str>>,
        style: Option<Cow<'a, str>>,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Words {
        centered: bool,
        words: Vec<Word<'a>>,
    },
}

Variants

Align

Fields of Align

alignment: Alignmentparagraphs: Vec<Paragraph<'a>>
Center

Fields of Center

words: Vec<Word<'a>>
ClearFloat

Fields of ClearFloat

direction: Option<Alignment>
CodeBlock

Fields of CodeBlock

language: Option<Cow<'a, str>>contents: &'a str
Collapsible

Fields of Collapsible

show_text: Option<Cow<'a, str>>hide_text: Option<Cow<'a, str>>id: Option<Cow<'a, str>>class: Option<Cow<'a, str>>style: Option<Cow<'a, str>>show_top: boolshow_bottom: boolparagraphs: Vec<Paragraph<'a>>
Div

Fields of Div

id: Option<Cow<'a, str>>class: Option<Cow<'a, str>>style: Option<Cow<'a, str>>paragraphs: Vec<Paragraph<'a>>
Heading

Fields of Heading

level: HeadingLevelwords: Vec<Word<'a>>
HorizontalLine
Html

Fields of Html

contents: &'a str
Iframe

Fields of Iframe

url: &'a strarguments: HashMap<&'a str, Cow<'a, str>>
IfTags

Fields of IfTags

required: Vec<&'a str>prohibited: Vec<&'a str>paragraphs: Vec<Paragraph<'a>>
Javascript

Fields of Javascript

contents: &'a str
List

Fields of List

style: ListStyledepth: usizeitems: Vec<Paragraph<'a>>
Math

Fields of Math

label: Option<&'a str>id: Option<&'a str>latex_env: Option<&'a str>expr: &'a str
Newlines

Fields of Newlines

count: usize
Table

Fields of Table

rows: Vec<TableRow<'a>>
TableOfContents

Fields of TableOfContents

QuoteBlock

Fields of QuoteBlock

id: Option<Cow<'a, str>>class: Option<Cow<'a, str>>style: Option<Cow<'a, str>>paragraphs: Vec<Paragraph<'a>>
Words

Fields of Words

centered: boolwords: Vec<Word<'a>>

Methods

impl<'a> Paragraph<'a>[src]

pub fn from_pair(pair: Pair<'a, Rule>) -> Result<Self>[src]

Trait Implementations

impl<'a> AsRef<Paragraph<'a>> for Paragraph<'a>[src]

impl<'a> Clone for Paragraph<'a>[src]

impl<'p> ComponentRender for Paragraph<'p>[src]

impl<'a> Debug for Paragraph<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Paragraph<'a>[src]

impl<'a> Eq for Paragraph<'a>[src]

impl<'a> PartialEq<Paragraph<'a>> for Paragraph<'a>[src]

impl<'a> Serialize for Paragraph<'a>[src]

impl<'a> StructuralEq for Paragraph<'a>[src]

impl<'a> StructuralPartialEq for Paragraph<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Paragraph<'a>

impl<'a> Send for Paragraph<'a>

impl<'a> Sync for Paragraph<'a>

impl<'a> Unpin for Paragraph<'a>

impl<'a> UnwindSafe for Paragraph<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.