[][src]Struct mdsh::cli::Opt

pub struct Opt {
    pub input: FileArg,
    pub output: Option<FileArg>,
    pub work_dir: Option<PathBuf>,
    pub frozen: bool,
    pub clean: bool,
}

Markdown shell pre-processor. Never let your READMEs and tutorials get out of sync again.

Exits non-zero if a sub-command failed.

Fields

input: FileArg

Path to the markdown file. - for stdin.

output: Option<FileArg>

Path to the output file, - for stdout [defaults to updating the input file in-place].

work_dir: Option<PathBuf>

Directory to execute the scripts under [defaults to the input file’s directory].

frozen: bool

Fail if the output is different from the input. Useful for CI.

Using --frozen, you can guarantee that developers update documentation when they make a change. Just add mdsh --frozen as a check to your continuous integration setup.

clean: bool

Remove all generated blocks.

Trait Implementations

impl Debug for Opt[src]

impl StructOpt for Opt[src]

Auto Trait Implementations

impl RefUnwindSafe for Opt

impl Send for Opt

impl Sync for Opt

impl Unpin for Opt

impl UnwindSafe for Opt

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.