[−][src]Struct md2src::MD2Src
Markdown to source code
Implementations
impl MD2Src
[src]
pub fn get_snippets_from_string(
&self,
markdown: String,
lang: String,
ignore: String
) -> Result<Vec<String>, ExitFailure>
[src]
&self,
markdown: String,
lang: String,
ignore: String
) -> Result<Vec<String>, ExitFailure>
Returns a vector of extracted code snippets.
Arguments
markdown
- The markdown stringlang
- The language of the code snippets defined after three backticksignore
- Ignore those code snippets that include this string
pub fn get_snippets_from_file(
&self,
file: String,
lang: String,
ignore: String
) -> Result<Vec<String>, ExitFailure>
[src]
&self,
file: String,
lang: String,
ignore: String
) -> Result<Vec<String>, ExitFailure>
Returns a vector of extracted code snippets.
Arguments
file
- The markdown filenamelang
- The language of the code snippets defined after three backticksignore
- Ignore those code snippets that include this string
pub fn write_snippets(
&self,
snippets: Vec<String>,
folder: String,
prefix: String,
ext: String
) -> Result<(), ExitFailure>
[src]
&self,
snippets: Vec<String>,
folder: String,
prefix: String,
ext: String
) -> Result<(), ExitFailure>
Writes a vector of extracted code snippets (each snippet one file: folder/prefix000.ext
).
Arguments
snippets
- The extracted code snippets.folder
- The target folder for the code files.prefix
- The prefix of the code files.ext
- The extension of the code files.
Auto Trait Implementations
impl RefUnwindSafe for MD2Src
impl Send for MD2Src
impl Sync for MD2Src
impl Unpin for MD2Src
impl UnwindSafe for MD2Src
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, 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>,