pub struct MarkdownBuilder { /* private fields */ }Expand description
Builder pattern for creating test content with common markdown patterns
Implementations§
Source§impl MarkdownBuilder
impl MarkdownBuilder
pub fn new() -> Self
pub fn heading(self, level: usize, text: &str) -> Self
pub fn paragraph(self, text: &str) -> Self
pub fn blank_line(self) -> Self
pub fn code_block(self, language: &str, code: &str) -> Self
pub fn unordered_list(self, items: &[&str]) -> Self
pub fn ordered_list(self, items: &[&str]) -> Self
pub fn line(self, text: &str) -> Self
pub fn blockquote(self, text: &str) -> Self
pub fn table(self, headers: &[&str], rows: &[Vec<&str>]) -> Self
pub fn link(self, text: &str, url: &str) -> Self
pub fn image(self, alt_text: &str, url: &str) -> Self
pub fn horizontal_rule(self) -> Self
pub fn inline_code(self, text: &str, code: &str) -> Self
pub fn emphasis(self, text: &str) -> Self
pub fn strong(self, text: &str) -> Self
pub fn strikethrough(self, text: &str) -> Self
pub fn footnote_definition(self, label: &str, content: &str) -> Self
pub fn footnote_reference(self, text: &str, label: &str) -> Self
pub fn task_list(self, items: &[(&str, bool)]) -> Self
pub fn nested_list(self, items: &[(&str, Option<Vec<&str>>)]) -> Self
pub fn definition_list(self, definitions: &[(&str, &str)]) -> Self
pub fn math_block(self, formula: &str) -> Self
pub fn inline_math(self, text: &str, formula: &str) -> Self
pub fn build(self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MarkdownBuilder
impl RefUnwindSafe for MarkdownBuilder
impl Send for MarkdownBuilder
impl Sync for MarkdownBuilder
impl Unpin for MarkdownBuilder
impl UnwindSafe for MarkdownBuilder
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