pub enum Mark {
CodeBlock(String, Option<String>),
Image(String, String, StyleImage),
NewLine,
Transition(usize, Vec<Mark>),
TransitionEnd,
Page(Vec<Mark>),
Separator(SeparatorDir),
Text(String, StyleText),
}
Expand description
The marks used in OpMark.
Variants
CodeBlock(String, Option<String>)
A code block element:
```language
code
```
Image(String, String, StyleImage)
An image element:
<options>
You can specify the size and the alignment of the image in options:
// Image with width of 50.
<w50>
// Image with height of 50.
<h50>
// Image with center alignment. Available values: auto, left, right, center.
<center>
You can combine options together, and each option is separated by |
.
options
is optional.
NewLine
A new line element.
Transition(usize, Vec<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(String, StyleText)
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
Auto Trait Implementations
impl RefUnwindSafe for Mark
impl Send for Mark
impl Sync for Mark
impl Unpin for Mark
impl UnwindSafe for Mark
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more