Struct kas::text::format::Markdown [−]
pub struct Markdown { /* fields omitted */ }
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), strikethrough
Not supported:
- Block quotes
- Footnotes
- HTML
- Horizontal rules
- Images
- Links
- Tables
- Task lists
Implementations
Trait Implementations
impl EditableText for Markdown
impl EditableText for Markdown
pub fn set_string(&mut self, string: String)
pub fn set_string(&mut self, string: String)
Set unformatted text Read more
pub fn swap_string(&mut self, string: &mut String)
pub fn swap_string(&mut self, string: &mut String)
Swap the contiguous unformatted text with another string
Read more
pub fn insert_char(&mut self, index: usize, c: char)
pub fn insert_char(&mut self, index: usize, c: char)
Insert a char
at the given position Read more
pub fn replace_range(&mut self, range: Range<usize>, replace_with: &str)
pub fn replace_range(&mut self, range: Range<usize>, replace_with: &str)
Replace text at range
with replace_with
Read more
impl FormattableText for Markdown
impl FormattableText for Markdown
pub fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
pub fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
Construct an iterator over formatting items Read more
impl StructuralPartialEq for Markdown
Auto Trait Implementations
impl RefUnwindSafe for Markdown
impl UnwindSafe for Markdown
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub 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
pub 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
pub 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
pub 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
impl<F> FormattableTextDyn for F where
F: 'static + FormattableText + Clone,
impl<F> FormattableTextDyn for F where
F: 'static + FormattableText + Clone,
pub fn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
pub fn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
Produce a boxed clone of self
pub fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
pub fn font_tokens(&self, dpp: f32, pt_size: f32) -> OwningVecIter<FontToken>ⓘNotable traits for OwningVecIter<T>impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
impl<T> Iterator for OwningVecIter<T> where
T: Clone, type Item = T;
Construct an iterator over formatting items Read more