[][src]Enum ftml::Word

pub enum Word<'a> {
    Anchor {
        href: Option<Cow<'a, str>>,
        name: Option<Cow<'a, str>>,
        id: Option<Cow<'a, str>>,
        class: Option<Cow<'a, str>>,
        style: Option<Cow<'a, str>>,
        target: Option<AnchorTarget>,
        words: Vec<Word<'a>>,
    },
    Bold {
        words: Vec<Word<'a>>,
    },
    Color {
        color: &'a str,
        words: Vec<Word<'a>>,
    },
    Css {
        style: &'a str,
    },
    Date {
        timestamp: i64,
        format: Option<&'a str>,
    },
    Email {
        address: &'a str,
        text: Option<&'a str>,
    },
    EquationReference {
        name: &'a str,
    },
    File {
        filename: &'a str,
        text: Option<&'a str>,
        target: Option<AnchorTarget>,
    },
    Footnote {
        paragraphs: Vec<Paragraph<'a>>,
    },
    FootnoteBlock,
    Form {
        contents: &'a str,
    },
    Gallery,
    Image {
        filename: &'a str,
        float: bool,
        direction: Option<Alignment>,
        link: Option<(&'a str, bool)>,
        arguments: Box<ImageArguments<'a>>,
    },
    Info {
        field: InfoField,
    },
    Italics {
        words: Vec<Word<'a>>,
    },
    Link {
        href: &'a str,
        target: Option<AnchorTarget>,
        text: LinkText<'a>,
    },
    Math {
        expr: &'a str,
    },
    Module {
        name: &'a str,
        arguments: HashMap<&'a str, Cow<'a, str>>,
        contents: Option<&'a str>,
    },
    Monospace {
        words: Vec<Word<'a>>,
    },
    Note {
        paragraphs: Vec<Paragraph<'a>>,
    },
    Raw {
        contents: &'a str,
    },
    Size {
        size: &'a str,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Span {
        id: Option<Cow<'a, str>>,
        class: Option<Cow<'a, str>>,
        style: Option<Cow<'a, str>>,
        paragraphs: Vec<Paragraph<'a>>,
    },
    Strikethrough {
        words: Vec<Word<'a>>,
    },
    Subscript {
        words: Vec<Word<'a>>,
    },
    Superscript {
        words: Vec<Word<'a>>,
    },
    TabList {
        tabs: Vec<Tab<'a>>,
    },
    Text {
        contents: &'a str,
    },
    Underline {
        words: Vec<Word<'a>>,
    },
    User {
        username: &'a str,
        show_picture: bool,
    },
}

Variants

Anchor

Fields of Anchor

href: Option<Cow<'a, str>>name: Option<Cow<'a, str>>id: Option<Cow<'a, str>>class: Option<Cow<'a, str>>style: Option<Cow<'a, str>>target: Option<AnchorTarget>words: Vec<Word<'a>>
Bold

Fields of Bold

words: Vec<Word<'a>>
Color

Fields of Color

color: &'a strwords: Vec<Word<'a>>
Css

Fields of Css

style: &'a str
Date

Fields of Date

timestamp: i64format: Option<&'a str>
Email

Fields of Email

address: &'a strtext: Option<&'a str>
EquationReference

Fields of EquationReference

name: &'a str
File

Fields of File

filename: &'a strtext: Option<&'a str>target: Option<AnchorTarget>
Footnote

Fields of Footnote

paragraphs: Vec<Paragraph<'a>>
FootnoteBlock
Form

Fields of Form

contents: &'a str
Gallery
Image

Fields of Image

filename: &'a strfloat: booldirection: Option<Alignment>link: Option<(&'a str, bool)>arguments: Box<ImageArguments<'a>>
Info

Fields of Info

field: InfoField
Italics

Fields of Italics

words: Vec<Word<'a>>

Fields of Link

href: &'a strtarget: Option<AnchorTarget>text: LinkText<'a>
Math

Fields of Math

expr: &'a str
Module

Fields of Module

name: &'a strarguments: HashMap<&'a str, Cow<'a, str>>contents: Option<&'a str>
Monospace

Fields of Monospace

words: Vec<Word<'a>>
Note

Fields of Note

paragraphs: Vec<Paragraph<'a>>
Raw

Fields of Raw

contents: &'a str
Size

Fields of Size

size: &'a strparagraphs: Vec<Paragraph<'a>>
Span

Fields of Span

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

Fields of Strikethrough

words: Vec<Word<'a>>
Subscript

Fields of Subscript

words: Vec<Word<'a>>
Superscript

Fields of Superscript

words: Vec<Word<'a>>
TabList

Fields of TabList

tabs: Vec<Tab<'a>>
Text

Fields of Text

contents: &'a str
Underline

Fields of Underline

words: Vec<Word<'a>>
User

Fields of User

username: &'a strshow_picture: bool

Methods

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

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

Trait Implementations

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

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

impl<'w> ComponentRender for Word<'w>[src]

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for Word<'a>

impl<'a> Send for Word<'a>

impl<'a> Sync for Word<'a>

impl<'a> Unpin for Word<'a>

impl<'a> UnwindSafe for Word<'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.