Struct minimad::Text[][src]

pub struct Text<'a> {
    pub lines: Vec<Line<'a>>,
}

a text, that is just a collection of lines

Fields

lines: Vec<Line<'a>>

Implementations

impl<'s> Text<'s>[src]

pub fn from_md_lines<I>(md_lines: I) -> Self where
    I: Iterator<Item = &'s str>, 
[src]

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> Clone for Text<'a>[src]

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

impl<'a> Default for Text<'a>[src]

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

impl<'s> From<&'s str> for Text<'s>[src]

fn from(md: &str) -> Text<'_>[src]

build a text from a multi-line string interpreted as markdown

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for Text<'a>[src]

impl<'a> Send for Text<'a>[src]

impl<'a> Sync for Text<'a>[src]

impl<'a> Unpin for Text<'a>[src]

impl<'a> UnwindSafe for Text<'a>[src]

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> 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.