pub struct Args {
pub paths: Vec<String>,
pub write: bool,
pub check: bool,
pub stdin: bool,
pub width: usize,
pub wrap: WrapMode,
pub ordered_list: OrderedListMode,
pub excludes: Vec<String>,
pub no_default_excludes: bool,
}Fields§
§paths: Vec<String>Files or directories to format (supports glob patterns, use - for stdin)
write: boolWrite formatted output to file in-place
check: boolCheck if files are formatted (exit with 1 if not)
stdin: boolRead from stdin
width: usizeLine width for wrapping (default: 80)
wrap: WrapModeHow to wrap prose: always (reflow to width), never (one line per paragraph), preserve (keep as-is)
ordered_list: OrderedListModeHow to number ordered lists: ascending (1, 2, 3), one (all 1.)
excludes: Vec<String>Additional directories to exclude (node_modules, target, .git, vendor, dist, build are excluded by default)
no_default_excludes: boolDon’t exclude any directories by default
Implementations§
Source§impl Args
impl Args
Sourcepub fn get_input_sources(&self) -> Result<Vec<InputSource>, String>
pub fn get_input_sources(&self) -> Result<Vec<InputSource>, String>
Resolve input paths to a list of markdown files or stdin
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more