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§

impl ConfigType for isize

source§

impl ConfigType for usize

source§

impl ConfigType for String

Implementors§