pub enum ColorMode {
Auto,
Always,
Never,
}Expand description
Whether the terminal dump serializers (crate::dump_root,
crate::dump_ops, crate::dump_node,
crate::dump_function_spans) emit ANSI color escapes.
This is the library-facing color policy. The CLI resolves user
intent (an explicit --color flag, the NO_COLOR convention, and
stdout tty detection) into one of these variants and threads it into
the *_with_color dump entry points.
Variants§
Auto
Color only when the underlying stream and environment permit it.
Maps to termcolor::ColorChoice::Auto, which honors NO_COLOR
and TERM=dumb. Note that Auto does not itself check
whether stdout is a terminal — a caller that wants
“no color when piped” must resolve a redirected stream to
ColorMode::Never before constructing the writer (the CLI
does this via std::io::IsTerminal).
Always
Always emit color escapes, regardless of stream or environment.
Never
Never emit color escapes.
Trait Implementations§
impl Copy for ColorMode
impl Eq for ColorMode
impl StructuralPartialEq for ColorMode
Auto Trait Implementations§
impl Freeze for ColorMode
impl RefUnwindSafe for ColorMode
impl Send for ColorMode
impl Sync for ColorMode
impl Unpin for ColorMode
impl UnsafeUnpin for ColorMode
impl UnwindSafe for ColorMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.