pub fn with_style<F, T>(&self, style: T, f: F)
    where
        F: FnOnce(&Printer),
        T: Into<Style>,
    {
        let style = style.into();

        let color = style.color;
        let effects = style.effects;

        // eprintln!("{:?}", effects);

        if let Some(color) = color {
            self.with_color(color, |printer| {
                printer.with_effects(effects, f);
            });
        } else {
            self.with_effects(effects, f);
        }
    }
/// Call the given closure with a styled printer,
/// that will apply the given style on prints.
Call the given closure with a styled printer,
that will apply the given style on prints.
Call the given closure with a styled printer that will apply the given style on prints .
pub fn with_style<F, T>(&self, style: T, f: F)
    where
        F: FnOnce(&Printer),
        T: Into<Style>,
    {
        let style = style.into();
        let color = style.color;
        let effects = style.effects;
        // eprintln!("{:?}", effects);
        if let Some(color) = color {
            self.with_color(color, |printer| {
                printer.with_effects(effects, f);
            });
        } else {
            self.with_effects(effects, f);
        }
    }
pub fn with_style < F , T > ( & self , style : T , f : F ) where F : FnOnce ( & Printer ) , T : Into < Style > , { let style = style . into ( ) ; let color = style . color ; let effects = style . effects ; // eprintln!("{:?}", effects); if let Some ( color ) = color { self . with_color ( color , | printer | { printer . with_effects ( effects , f ) ; } ) ; } else { self . with_effects ( effects , f ) ; } }
Call the given closure with a styled printer,
that will apply the given style on prints.
Call the given closure with a styled printer that will apply the given style on prints .
&self
style
T
f
F
&self
style
T
f
F