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, dpem: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T>where
T: Clone, type Item = T;
fn font_tokens(&self, dpem: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T>where
T: Clone, type Item = T;
T: Clone, type Item = T;
Construct an iterator over formatting items Read more
sourcefn effect_tokens(&self) -> &[Effect<()>]
fn effect_tokens(&self) -> &[Effect<()>]
Get the sequence of effect tokens Read more
sourceimpl PartialEq<Markdown> for Markdown
impl PartialEq<Markdown> for Markdown
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 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
sourceimpl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
sourcefn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Try approximate conversion from Self to T Read more
sourcefn cast_approx(self) -> T
fn cast_approx(self) -> T
Cast approximately from Self to T Read more
sourceimpl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
sourcefn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
sourcefn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
sourcefn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
sourcefn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
sourcefn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
sourcefn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
sourcefn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more
sourceimpl<F> FormattableTextDyn for Fwhere
F: 'static + FormattableText + Clone,
impl<F> FormattableTextDyn for Fwhere
F: 'static + FormattableText + Clone,
sourcefn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
fn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
Produce a boxed clone of self
sourcefn font_tokens(&self, dpem: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T>where
T: Clone, type Item = T;
fn font_tokens(&self, dpem: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T>where
T: Clone, type Item = T;
T: Clone, type Item = T;
Construct an iterator over formatting items Read more
sourcefn effect_tokens(&self) -> &[Effect<()>]
fn effect_tokens(&self) -> &[Effect<()>]
Get the sequence of effect tokens Read more