Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Default variant

To define a default variant, use the Default trait and the optional #[default] variant attribute. We provide no special functionality or syntax for handling defaults.

#![allow(unused)]
fn main() {
#[derive(ConfigEnum, Default)]
enum LogLevel {
	Info,
	Error,
	Debug,
	#[default]
	Off
}
}