[−][src]Struct markdown_composer::types::markdown::Markdown
A markdown document.
Fields
elements: Vec<Box<dyn MarkdownElement>>
The markdown elements.
The markdown footer elements.
Implementations
impl<'a> Markdown
[src]
pub fn new() -> Self
[src]
Creates a new default Markdown
instance.
pub fn with(
elements: Vec<Box<dyn MarkdownElement>>,
footers: Vec<Box<dyn MarkdownElement>>
) -> Self
[src]
elements: Vec<Box<dyn MarkdownElement>>,
footers: Vec<Box<dyn MarkdownElement>>
) -> Self
Creates a new Markdown
instance with the given elements and footers.
pub fn header(
&mut self,
text: impl Into<String>,
level: impl ToUsize
) -> &mut Self
[src]
&mut self,
text: impl Into<String>,
level: impl ToUsize
) -> &mut Self
Adds a header to the document.
Arguments
text
: The header's text.level
: The header's level.
Panics
Panics if the header level is not valid (one to six inclusive).
pub fn header1(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn header2(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn header3(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn header4(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn header5(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn header6(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn list(&mut self, list: List) -> &mut Self
[src]
pub fn link(&mut self, link: Link) -> &mut Self
[src]
Adds a link to the document.
Arguments
link
: The link instance to add.
Note
The associated footer element is added as well if the passed link is marked as footer.
pub fn paragraph(&mut self, text: impl Into<String>) -> &mut Self
[src]
pub fn render(&self) -> String
[src]
Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,