pub struct Styles(/* private fields */);Expand description
Terminal styling definitions for help text output.
This is a newtype wrapper around clap::builder::Styles to avoid exposing clap types
directly in the public API. Use this with the #[conf(styles = ...)] attribute to
customize the colors and formatting of help text.
§Example
use conf::Conf;
use anstyle::{AnsiColor, Style};
const HELP_STYLES: conf::Styles = conf::Styles::styled()
.header(AnsiColor::Blue.on_default().bold())
.usage(AnsiColor::Blue.on_default().bold())
.literal(AnsiColor::White.on_default())
.placeholder(AnsiColor::Green.on_default());
#[derive(Conf)]
#[conf(styles = HELP_STYLES)]
struct Args {
#[conf(long)]
name: String,
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Styles
impl RefUnwindSafe for Styles
impl Send for Styles
impl Sync for Styles
impl Unpin for Styles
impl UnwindSafe for Styles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more