pub fn prompt_or_default_with<R, W, T>(
        &self,
        stream: &mut MenuStream<R, W>,
        fmt: &Format<'_>,
    ) -> T
    where
        R: BufRead,
        W: Write,
        T: FromStr + Default,
    {
        self.optional_value_with(stream, fmt)
            .map(Option::unwrap_or_default)
            .unwrap_or_default()
    }
/// Prompts the field and returns the input value, or the default value of the type
/// 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 value once, and if the user entered a correct input, it returns the 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
/// the [default](Default) implementation of `T`.
///
/// # Panics
///
/// If the default value has an incorrect type, this function will panic.
Prompts the field and returns the input value, or the default value of the type
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.


Prompts the field and returns the input value or the default value of the type 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 .
pub fn prompt_or_default_with<R, W, T>(
        &self,
        stream: &mut MenuStream<R, W>,
        fmt: &Format<'_>,
    ) -> T
    where
        R: BufRead,
        W: Write,
        T: FromStr + Default,
    {
        self.optional_value_with(stream, fmt)
            .map(Option::unwrap_or_default)
            .unwrap_or_default()
    }
pub fn prompt_or_default_with < R , W , T > ( & self , stream : & mut MenuStream < R , W > , fmt : & Format < ' _ > , ) -> T where R : BufRead , W : Write , T : FromStr + Default , { self . optional_value_with ( stream , fmt ) . map ( Option :: unwrap_or_default ) . unwrap_or_default ( ) }
Prompts the field and returns the input value, or the default value of the type
if the input is incorrect, using the given format.
Prompts the field and returns the input value or the default value of the type 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 .