/// Maps variable name in a style string to its value
///
/// See `StringFormatter::map` for description on the parameters.
Maps variable name in a style string to its value
See `StringFormatter::map` for description on the parameters.
Maps variable name in a style string to its value See ` StringFormatter :: map ` for description on the parameters .
pub fn map_style<T, M>(mut self, mapper: M) -> Self
    where
        T: Into<Cow<'a, str>>,
        M: Fn(&str) -> Option<Result<T, StringFormatterError>> + Sync,
    {
        self.style_variables
            .par_iter_mut()
            .filter(|(_, value)| value.is_none())
            .for_each(|(key, value)| {
                *value = mapper(key).map(|var| var.map(|var| var.into()));
            });
        self
    }
pub fn map_style < T , M > ( mut self , mapper : M ) -> Self where T : Into < Cow < ' a , str > > , M : Fn ( & str ) -> Option < Result < T , StringFormatterError > > + Sync , { self . style_variables . par_iter_mut ( ) . filter ( | ( _ , value ) | value . is_none ( ) ) . for_each ( | ( key , value ) | { * value = mapper ( key ) . map ( | var | var . map ( | var | var . into ( ) ) ) ; } ) ; self }
Maps variable name in a style string to its value
See `StringFormatter::map` for description on the parameters.
Maps variable name in a style string to its value See ` StringFormatter :: map ` for description on the parameters .
mut self
<not_specific>
mapper
M
<not_specific>