pub fn optional_value_with<R, W, T>(
        &self,
        stream: &mut MenuStream<R, W>,
        fmt: &Format<'_>,
    ) -> MenuResult<Option<T>>
    where
        R: BufRead,
        W: Write,
        T: FromStr,
    {
        let fmt = self.fmt.merged(fmt);
        self.first_line(stream, &fmt, true)?;
        self.prompt_once(stream, &fmt, true)
    }
/// Prompts the field and returns the input, or `None` if the input is incorrect,
/// using the given format.
///
/// It uses the merged version between the format of the written field and the given format.
///
/// 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,
using the given format.

It uses the merged version between the format of the written field and the given format.

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 using the given format . It uses the merged version between the format of the written field and the given format . 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_with<R, W, T>(
        &self,
        stream: &mut MenuStream<R, W>,
        fmt: &Format<'_>,
    ) -> MenuResult<Option<T>>
    where
        R: BufRead,
        W: Write,
        T: FromStr,
    {
        let fmt = self.fmt.merged(fmt);
        self.first_line(stream, &fmt, true)?;
        self.prompt_once(stream, &fmt, true)
    }
pub fn optional_value_with < R , W , T > ( & self , stream : & mut MenuStream < R , W > , fmt : & Format < ' _ > , ) -> MenuResult < Option < T > > where R : BufRead , W : Write , T : FromStr , { let fmt = self . fmt . merged ( fmt ) ; self . first_line ( stream , & fmt , true ) ? ; self . prompt_once ( stream , & fmt , true ) }
Prompts the field and returns the input, or `None` if the input is incorrect,
using the given format.
Prompts the field and returns the input or ` None ` if the input is incorrect using the given format .
&self
stream
&mut MenuStream<R, W>
fmt
&Format<'_>
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 .