pub fn optional_value<R, W, T>(&self, stream: &mut MenuStream<R, W>) -> MenuResult<Option<T>>
    where
        R: BufRead,
        W: Write,
        T: FromStr,
    {
        self.optional_value_with(stream, &self.fmt)
    }
/// Prompts the field and returns the input, or `None` if the input is incorrect.
///
/// It prompts the field once, and if the user entered a correct input,
/// it returns `Some(value)`, otherwise, it attempts to return the default value
/// (see [`Written::default_value`] or [`Written::default_env`]), and if there is no
/// default value, it returns `None`.
///
/// The output is wrapped in a [`MenuResult`] to prevent from any error (see [`MenuError`]).
///
/// # Panics
///
/// If the default value has an incorrect type, this function will panic.
Prompts the field and returns the input, or `None` if the input is incorrect.
It prompts the field once, and if the user entered a correct input,
it returns `Some(value)`, otherwise, it attempts to return the default value
, and if there is no
default value, it returns `None`.

The output is wrapped in a [`MenuResult`] to prevent from any error .
Prompts the field and returns the input or ` None ` if the input is incorrect . It prompts the field once and if the user entered a correct input it returns ` Some ( value ) ` otherwise it attempts to return the default value and if there is no default value it returns ` None ` . The output is wrapped in a [ ` MenuResult ` ] to prevent from any error .
pub fn optional_value<R, W, T>(&self, stream: &mut MenuStream<R, W>) -> MenuResult<Option<T>>
    where
        R: BufRead,
        W: Write,
        T: FromStr,
    {
        self.optional_value_with(stream, &self.fmt)
    }
pub fn optional_value < R , W , T > ( & self , stream : & mut MenuStream < R , W > ) -> MenuResult < Option < T > > where R : BufRead , W : Write , T : FromStr , { self . optional_value_with ( stream , & self . fmt ) }
Prompts the field and returns the input, or `None` if the input is incorrect.
Prompts the field and returns the input or ` None ` if the input is incorrect .
&self
stream
&mut MenuStream<R, W>
panics
If the default value has an incorrect type, this function will panic.
If the default value has an incorrect type this function will panic .