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§
Provided Methods§
Sourcefn stable_variant(&self) -> bool
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.