pub enum Mark {
    CodeBlock(StringOption<String>),
    Image(StringStringStyleImage),
    NewLine,
    Transition(usizeVec<Mark>),
    TransitionEnd,
    Page(Vec<Mark>),
    Separator(SeparatorDir),
    Text(StringStyleText),
}
Expand description

The marks used in OpMark.

Variants

CodeBlock(StringOption<String>)

A code block element:

```language
code
```

Image(StringStringStyleImage)

An image element:

![title](src)<options>

You can specify the size and the alignment of the image in options:

// Image with width of 50.
![test](test.png)<w50>
// Image with height of 50.
![test](test.png)<h50>
// Image with center alignment. Available values: auto, left, right, center.
![test](test.png)<center>

You can combine options together, and each option is separated by |.

options is optional.

NewLine

A new line element.

Transition(usizeVec<Mark>)

A transition element:

---t

A transition is a group of elements which show up together after interaction (usually mouse click or keyboard input).

A transition starts at a transition mark (---t), and ends at either the next transition mark, next page mark, or a transition end mark.

Number can be appended to a transition mark, indicates that the order of the appearence of this transition group (noted that the index starts from 0), otherwise the transitions show up from top to bottom:

---t
This line will show up after the first interaction.
---t3
This line will show up after the fourth interaction.
---t1
This line will show up after the second interaction.

TransitionEnd

An element marks where the previous transition ends:

t----

Page(Vec<Mark>)

A page mark:

---

A page is a group of transitions. Transitions from different pages would never appear in the window at the same time.

Separator(SeparatorDir)

A separator element:

---- // A horizontal separator.
----v // A vertical separator.

Text(StringStyleText)

A text element:

normal text
# heading 1
## heading 2
### heading 3
#### heading 4
##### heading 5

*bold*
`code`
/italics/
$small$
~strikethrough~
_underline_

<hyperlink>
[hyperlink title](hyperlink)

- unordered list

1. ordered list

Trait Implementations

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.