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§