pub fn format(mut self, fmt: Format<'a>) -> Self {
        self.fmt = fmt;
        // Saves the default suffix if asked to break the line,
        // because it would be ugly to have for instance ": " as suffix.
        // This is useful if the format is inherited (see [`Values::selected`] function).
        if !self.fmt.line_brk {
            self.fmt.suffix = DEFAULT_FMT.suffix;
        }
        self
    }
/// Gives a custom formatting for the selected value.
///
/// # Example
///
/// ```
/// # use ezmenulib::field::{Selected, Format, Selectable};
/// enum Type {
///     MIT,
///     GPL,
///     BSD,
/// }
///
/// let w = Selected::new("Select the license type", [
///     ("MIT", Type::MIT),
///     ("GPL", Type::GPL),
///     ("BSD", Type::BSD),
/// ])
/// .format(Format::prefix("==> "));
/// ```
Gives a custom formatting for the selected value.
Gives a custom formatting for the selected value .
pub fn format(mut self, fmt: Format<'a>) -> Self {
        self.fmt = fmt;
        // Saves the default suffix if asked to break the line,
        // because it would be ugly to have for instance ": " as suffix.
        // This is useful if the format is inherited (see [`Values::selected`] function).
        if !self.fmt.line_brk {
            self.fmt.suffix = DEFAULT_FMT.suffix;
        }
        self
    }
pub fn format ( mut self , fmt : Format < ' a > ) -> Self { self . fmt = fmt ; // Saves the default suffix if asked to break the line, // because it would be ugly to have for instance ": " as suffix. // This is useful if the format is inherited (see [`Values::selected`] function). if ! self . fmt . line_brk { self . fmt . suffix = DEFAULT_FMT . suffix ; } self }
Gives a custom formatting for the selected value.
Gives a custom formatting for the selected value .
mut self
fmt
Format<'a>
example
None
use ezmenulib::field::{selected, format, selectable};
enum Type {
MIT,
GPL,
BSD,
}


enum Type { MIT GPL BSD }