ProcessingState

Struct ProcessingState 

Source
pub struct ProcessingState {
    pub section: Section,
    pub code: Vec<String>,
    pub original_output: Vec<String>,
    pub skip_code_block: bool,
    pub output: Option<Vec<String>>,
    pub new_lines: Vec<String>,
    pub backtick_options: BacktickOptions,
    pub backtick_standardize: bool,
    pub indent: String,
    pub verbose: bool,
    /* private fields */
}
Expand description

Processing state for the Markdown file.

Fields§

§section: Section

Current section being processed.

§code: Vec<String>

Code lines collected from the current code block.

§original_output: Vec<String>

Original output lines (preserved when skipping).

§skip_code_block: bool

Whether to skip the next code block.

§output: Option<Vec<String>>

Output from the last executed code block.

§new_lines: Vec<String>

New lines being built.

§backtick_options: BacktickOptions

Options from the current backtick code block.

§backtick_standardize: bool

Whether to standardize backticks (remove markdown-code-runner).

§indent: String

Indentation of the current code block.

§verbose: bool

Verbose mode for debugging.

Implementations§

Source§

impl ProcessingState

Source

pub fn new(backtick_standardize: bool, verbose: bool) -> Self

Create a new processing state.

Source

pub fn process_line(&mut self, line: &str) -> Result<()>

Process a single line of the Markdown file.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.