pub struct TerminalColorPolicy {
pub enabled: bool,
pub depth: ColorDepth,
}Expand description
Resolved stdio color policy for consumers that own their renderer.
This is the same environment and terminal-capability decision used by
Console::stdio, exposed for cell-grid and widget backends that need to
select their own color converter.
Fields§
§enabled: bool§depth: ColorDepthImplementations§
Source§impl TerminalColorPolicy
impl TerminalColorPolicy
Sourcepub fn detect_stdout(choice: ColorChoice) -> Self
pub fn detect_stdout(choice: ColorChoice) -> Self
Resolve stdout color selection from terminal capabilities, NO_COLOR,
TERM, COLORTERM, and the caller’s explicit choice.
Sourcepub fn detect_stderr(choice: ColorChoice) -> Self
pub fn detect_stderr(choice: ColorChoice) -> Self
Resolve stderr color selection from terminal capabilities, NO_COLOR,
TERM, COLORTERM, and the caller’s explicit choice.
Trait Implementations§
Source§impl Clone for TerminalColorPolicy
impl Clone for TerminalColorPolicy
impl Copy for TerminalColorPolicy
Source§impl Debug for TerminalColorPolicy
impl Debug for TerminalColorPolicy
impl Eq for TerminalColorPolicy
Source§impl PartialEq for TerminalColorPolicy
impl PartialEq for TerminalColorPolicy
impl StructuralPartialEq for TerminalColorPolicy
Auto Trait Implementations§
impl Freeze for TerminalColorPolicy
impl RefUnwindSafe for TerminalColorPolicy
impl Send for TerminalColorPolicy
impl Sync for TerminalColorPolicy
impl Unpin for TerminalColorPolicy
impl UnsafeUnpin for TerminalColorPolicy
impl UnwindSafe for TerminalColorPolicy
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