Skip to main content

ConvertRequest

Struct ConvertRequest 

Source
pub struct ConvertRequest<'a> {
    pub input: &'a Path,
    pub output: &'a Path,
    pub bare: bool,
    pub unsafe_html: bool,
    pub private_output: bool,
    pub css_override: Option<&'a Path>,
}
Expand description

One render request for convert: a Markdown input, a destination, and the render options. verbose is deliberately absent — diagnostics are the caller’s presentation concern, and ConvertOutcome::timings carries everything a caller needs to print them.

Fields§

§input: &'a Path

The Markdown source file.

§output: &'a Path

The HTML file to write; created when missing, overwritten when present.

§bare: bool

Emit only the HTML fragment (no <html>, <head>, <body>, no CSS).

§unsafe_html: bool

Preserve raw HTML from the Markdown source instead of sanitizing it.

§private_output: bool

Write the output file readable only by the current user.

§css_override: Option<&'a Path>

Custom CSS appended after mdo’s default styling. Read from disk here and ignored under bare, because bare output emits no CSS.

Trait Implementations§

Source§

impl<'a> Debug for ConvertRequest<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for ConvertRequest<'a>

§

impl<'a> Freeze for ConvertRequest<'a>
where &'a Path: Freeze,

§

impl<'a> Move for ConvertRequest<'a>

§

impl<'a> RefUnwindSafe for ConvertRequest<'a>

§

impl<'a> Send for ConvertRequest<'a>
where &'a Path: Send,

§

impl<'a> Sync for ConvertRequest<'a>

§

impl<'a> Unpin for ConvertRequest<'a>
where &'a Path: Unpin,

§

impl<'a> UnsafeUnpin for ConvertRequest<'a>
where &'a Path: UnsafeUnpin,

§

impl<'a> UnwindSafe for ConvertRequest<'a>
where &'a Path: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.