pub struct Markdown { /* private fields */ }
Expand description
Basic Markdown formatter
Currently this misses several important Markdown features, but may still prove a convenient way of constructing formatted texts.
Supported:
- Text paragraphs
- Code (embedded and blocks); caveat: extra line after code blocks
- Explicit line breaks
- Headings
- Lists (numerated and bulleted); caveat: indentation after first line
- Bold, italic (emphasis), strike-through
Not supported:
- Block quotes
- Footnotes
- HTML
- Horizontal rules
- Images
- Links
- Tables
- Task lists
Implementations
Trait Implementations
sourceimpl EditableText for Markdown
impl EditableText for Markdown
sourcefn set_string(&mut self, string: String)
fn set_string(&mut self, string: String)
Set unformatted text Read more
sourcefn swap_string(&mut self, string: &mut String)
fn swap_string(&mut self, string: &mut String)
Swap the contiguous unformatted text with another string
Read more
sourcefn insert_char(&mut self, index: usize, c: char)
fn insert_char(&mut self, index: usize, c: char)
Insert a char
at the given position Read more
sourceimpl FormattableText for Markdown
impl FormattableText for Markdown
sourcefn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T: Clone> Iterator for OwningVecIter<T> type Item = T;
fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T: Clone> Iterator for OwningVecIter<T> type Item = T;
Construct an iterator over formatting items Read more
impl StructuralPartialEq for Markdown
Auto Trait Implementations
impl RefUnwindSafe for Markdown
impl Send for Markdown
impl Sync for Markdown
impl Unpin for Markdown
impl UnwindSafe for Markdown
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<S, T> CastFloat<T> for S where
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for S where
T: ConvFloat<S>,
sourcepub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
sourcepub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
sourcepub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
sourcepub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
sourcepub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
sourcepub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
sourcepub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more
sourceimpl<F> FormattableTextDyn for F where
F: 'static + FormattableText + Clone,
impl<F> FormattableTextDyn for F where
F: 'static + FormattableText + Clone,
sourcefn clone_boxed(&self) -> Box<dyn FormattableTextDyn>
fn clone_boxed(&self) -> Box<dyn FormattableTextDyn>
Produce a boxed clone of self
sourcefn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T: Clone> Iterator for OwningVecIter<T> type Item = T;
fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T: Clone> Iterator for OwningVecIter<T> type Item = T;
Construct an iterator over formatting items Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more