[−][src]Trait equt_md_ext::MarkdownExt
An interface for extending the original Markdown event iterator.
Required methods
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
Different from a normal iterator, MarkdownExt
must own the frontmatter
data.
Provided methods
fn after<P, F, S, G>(self, after: P, f: F) -> After<Self, F, S, P> where
Self: Sized,
P: Fn(&T) -> bool,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Self: Sized,
P: Fn(&T) -> bool,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Place pseudo events iterator after the first occurence of a certain event.
f
will be called only if after
matches. This also helps when the FrontMatter
is only available after some point.
fn before<P, F, S, G>(self, before: P, f: F) -> Before<Self, F, S, P> where
Self: Sized,
P: Fn(&T) -> bool,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Self: Sized,
P: Fn(&T) -> bool,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Place pseudo events iterator before the first occurence of a certain event.
f
will only be called if before
matches. This also helps when the FrontMatter
is only available after some point.
fn link<E>(self, other: E) -> Link<Self, E> where
Self: Sized,
E: MarkdownExt<T>,
Self: Sized,
E: MarkdownExt<T>,
Just like the standard chain
for iterator, the frontmatter will get transferred
- If both have frontmatter, the latter one would be picked
- If neither has frontmatter, it would be
None
- Otherwise, the only frontmatter would be used
fn head<F, G, H>(self, f: F) -> Head<Self, H, F> where
Self: Sized,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Self: Sized,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Place events at the begingging.
fn tail<F, G, H>(self, f: F) -> Tail<Self, H, F> where
Self: Sized,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Self: Sized,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
Place events at the end.
Implementors
impl<'e> MarkdownExt<Event<'e>> for Parser<'e>
[src]
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
[src]
impl<A, B, T> MarkdownExt<T> for Link<A, B> where
A: Iterator<Item = T>,
B: Iterator<Item = T>,
[src]
A: Iterator<Item = T>,
B: Iterator<Item = T>,
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
[src]
impl<I, H, F, G, T> MarkdownExt<T> for Head<I, H, F> where
I: Iterator<Item = T>,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
[src]
I: Iterator<Item = T>,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
[src]
impl<I, H, F, G, T> MarkdownExt<T> for Tail<I, H, F> where
I: Iterator<Item = T>,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
[src]
I: Iterator<Item = T>,
H: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = H>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
[src]
impl<I, S, G, F, P, T> MarkdownExt<T> for After<I, F, S, P> where
I: Iterator<Item = T>,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
P: Fn(&T) -> bool,
[src]
I: Iterator<Item = T>,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
P: Fn(&T) -> bool,
fn frontmatter(&self) -> Rc<RefCell<Option<FrontMatter>>>
[src]
impl<I, S, G, F, P, T> MarkdownExt<T> for Before<I, F, S, P> where
I: Iterator<Item = T>,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
P: Fn(&T) -> bool,
[src]
I: Iterator<Item = T>,
S: Iterator<Item = T>,
G: IntoIterator<Item = T, IntoIter = S>,
F: Fn(Ref<Option<FrontMatter>>) -> G,
P: Fn(&T) -> bool,