pub struct Palette { /* private fields */ }Expand description
A palette: a function from Style to a sequence of SGR codes. plain
produces no codes at all (plain text); styled produces rustc-like colors.
Implementations§
Source§impl Palette
impl Palette
Sourcepub const fn plain() -> Palette
pub const fn plain() -> Palette
A no-op palette: every style renders as plain text. Used by the default
Renderer and by snapshot tests.
Sourcepub const fn styled() -> Palette
pub const fn styled() -> Palette
The colored palette (rustc-like). Only emits ANSI when styled.
Sourcepub fn from_enabled(enabled: bool) -> Palette
pub fn from_enabled(enabled: bool) -> Palette
Build a palette from a resolved color decision.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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