[−][src]Function idioma::custom
pub fn custom<I>(label: ColoredString) -> impl Fn(I) -> Text where
I: Display,
Allows you to create and print messages with custom labels. Essentially, allows you to write
your own functions like error
, info
, etc. that we already have here.
Example
use idioma::*; use colored::*; let custom_label = custom("custom".blue().bold()); custom_label("This is a custom label. You can make one too!"); custom_label("Declare it once and reuse.");