pub struct Config<K, P, V> where
    K: Eq + Hash + AsRef<OsStr>,
    P: Into<PathBuf>,
    V: AsRef<OsStr>, 
{ /* private fields */ }
Expand description

The configuration for the formatters. Most of the options are for rustfmt only (they are ignored by PrettyPlease, but PostProcess options are used by both formatters).

Implementations

Creates a new blank configuration with &str for all type params (if you wish to use different types, use new instead)

Creates a new configuration from the given HashMap of options using &str for all type params (if you wish to use different types, use from_hash_map instead)

Creates a new blank configuration without type parameter assumptions

Creates a new configuration from the given HashMap of options with no type assumptions

Set the path to the rustfmt binary to use (RustFmt only, ignored by PrettyPlease). This takes precedence over the RUSTFMT environment variable, if specified

Set the Rust edition of the source input (RustFmt only, ignored by PrettyPlease)

Set the post processing option after formatting (used by both RustFmt and PrettyPlease)

Set a key/value pair option (RustFmt only, ignored by PrettyPlease). See here for a list of possible options

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.