pub struct Style { /* private fields */ }Expand description
Whether help output is coloured, and which colours the four semantic roles use.
Plain rendering remains available for generated documents and snapshots;
process-facing help uses Style::auto. Remap roles with Style::palette.
Implementations§
Source§impl Style
impl Style
Sourcepub const PLAIN: Style
pub const PLAIN: Style
Plain text, suitable for a pipe or a generated artifact.
ANSI CSI escapes already present in authored help are removed as well.
Sourcepub const fn palette(self, palette: Palette) -> Style
pub const fn palette(self, palette: Palette) -> Style
Remap the four semantic roles. Plain rendering ignores the palette.
Sourcepub fn auto_stderr() -> Style
pub fn auto_stderr() -> Style
Colour when stderr is a terminal and the environment permits it.
Trait Implementations§
impl Copy for Style
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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