pub struct Content { /* private fields */ }Expand description
A bunch of Markdown that has been parsed.
Implementations§
Source§impl Content
impl Content
Sourcepub fn parse(markdown: &str) -> Content
pub fn parse(markdown: &str) -> Content
Creates some new Content by parsing the given Markdown.
Sourcepub fn push_str(&mut self, markdown: &str)
pub fn push_str(&mut self, markdown: &str)
Pushes more Markdown into the Content; parsing incrementally!
This is specially useful when you have long streams of Markdown; like big files or potentially long replies.
Only the last item is re-parsed on every call; and, when the last item is a list, only its last bullet is re-parsed, so that pushing new items to a long list stays cheap.
The result converges to the one obtained by parsing the whole stream at once, as the stream grows.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Content
impl !Sync for Content
impl Freeze for Content
impl Send for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more