Expand description
a text, that is just a collection of lines
Fields
lines: Vec<Line<'a>>
Implementations
sourceimpl<'s> Text<'s>
impl<'s> Text<'s>
sourcepub fn from_md_lines<I>(md_lines: I) -> Selfwhere
I: Iterator<Item = &'s str>,
pub fn from_md_lines<I>(md_lines: I) -> Selfwhere
I: Iterator<Item = &'s str>,
parse a text from markdown lines.
The main reason to use this one is to use
the clean::lines
function which is useful with
raw literals:
use minimad::{clean, Text};
let md = clean::lines(r#"
* some bullet item
some text
some_code();
"#);
let text = Text::from_md_lines(md.into_iter());
Trait Implementations
impl<'a> Eq for Text<'a>
impl<'a> StructuralEq for Text<'a>
impl<'a> StructuralPartialEq for Text<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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