rustfmt_nightly

Trait CliOptions

source
pub trait CliOptions {
    // Required methods
    fn apply_to(self, config: &mut Config);
    fn config_path(&self) -> Option<&Path>;
    fn edition(&self) -> Option<Edition>;
    fn style_edition(&self) -> Option<StyleEdition>;
    fn version(&self) -> Option<Version>;
}
Expand description

Maps client-supplied options to Rustfmt’s internals, mostly overriding values in a config with values from the command line.

Required Methods§

source

fn apply_to(self, config: &mut Config)

source

fn config_path(&self) -> Option<&Path>

It is ok if the returned path doesn’t exist or is not canonicalized (i.e. the callers are expected to handle such cases).

source

fn edition(&self) -> Option<Edition>

source

fn style_edition(&self) -> Option<StyleEdition>

source

fn version(&self) -> Option<Version>

Implementors§