pub fn or_else<F>(mut self, default: F) -> Detail<T>
    where
        F: Fn() -> T,
    {
        if self.value.is_none() {
            self.value = Some(default());
            self.variation_index = None;
        }
        self
    }
/// Set the [Detail::value] to `default` if it does not exist.
///
/// This method accomplishes the same thing as [Detail::or] but allows the default value to be
/// provided through the result of a callback. This helps reduce computation where an
/// evaluation default value might be costly to calculate and is likely infrequently used.
Set the [Detail::value] to `default` if it does not exist.
This method accomplishes the same thing as [Detail::or] but allows the default value to be
provided through the result of a callback. This helps reduce computation where an
evaluation default value might be costly to calculate and is likely infrequently used.
Set the [ Detail :: value ] to ` default ` if it does not exist . This method accomplishes the same thing as [ Detail :: or ] but allows the default value to be provided through the result of a callback . This helps reduce computation where an evaluation default value might be costly to calculate and is likely infrequently used .
pub fn or_else<F>(mut self, default: F) -> Detail<T>
    where
        F: Fn() -> T,
    {
        if self.value.is_none() {
            self.value = Some(default());
            self.variation_index = None;
        }
        self
    }
pub fn or_else < F > ( mut self , default : F ) -> Detail < T > where F : Fn ( ) -> T , { if self . value . is_none ( ) { self . value = Some ( default ( ) ) ; self . variation_index = None ; } self }
Set the [Detail::value] to `default` if it does not exist.
Set the [ Detail :: value ] to ` default ` if it does not exist .
mut self
default
F
mut self
default
F