# Trait rustfmt_nightly::config::config_type::ConfigType

source ·

    pub(crate) trait ConfigType: Sized {
        // Required method
        fn doc_hint() -> String;

        // Provided method
        fn stable_variant(&self) -> bool { ... }
    }

Expand description

Trait for types that can be used in `Config`.

## Required Methods§

source

#### fn doc_hint() -> String

Returns hint text for use in `Config::print_docs()`. For enum types, this is a pipe-separated list of variants; for other types it returns `<type>`.

## Provided Methods§

source

#### fn stable_variant(&self) -> bool

Return `true` if the variant (i.e. value of this type) is stable.

By default, return true for all values. Enums annotated with `#[config_type]` are automatically implemented, based on the `#[unstable_variant]` annotation.

## Object Safety§

This trait is not object safe.

## Implementations on Foreign Types§

source§

### impl ConfigType for bool

source§

#### fn doc_hint() -> String

source§

### impl ConfigType for isize

source§

#### fn doc_hint() -> String

source§

### impl ConfigType for usize

source§

#### fn doc_hint() -> String

source§

### impl ConfigType for String

source§

#### fn doc_hint() -> String

## Implementors§

source§

### impl ConfigType for ListTactic

source§

### impl ConfigType for SeparatorPlace

source§

### impl ConfigType for SeparatorTactic

source§

### impl ConfigType for BraceStyle

source§

### impl ConfigType for Color

source§

### impl ConfigType for ControlBraceStyle

source§

### impl ConfigType for Density

source§

### impl ConfigType for Edition

source§

### impl ConfigType for EmitMode

source§

### impl ConfigType for GroupImportsTactic

source§

### impl ConfigType for Heuristics

source§

### impl ConfigType for HexLiteralCase

source§

### impl ConfigType for ImportGranularity

source§

### impl ConfigType for IndentStyle

source§

### impl ConfigType for MatchArmLeadingPipe

source§

### impl ConfigType for NewlineStyle

source§

### impl ConfigType for ReportTactic

source§

### impl ConfigType for TypeDensity

source§

### impl ConfigType for Verbosity

source§

### impl ConfigType for Version

source§

### impl ConfigType for FileLines

source§

### impl ConfigType for MacroSelectors

source§

### impl ConfigType for IgnoreList

source§

### impl ConfigType for WidthHeuristics