Struct unwind_context::AnsiColorScheme
source · pub struct AnsiColorScheme {
pub default: &'static str,
pub location: &'static str,
pub fn_keyword: &'static str,
pub func_name: &'static str,
pub func_braces: &'static str,
pub value_braces: &'static str,
pub ident: &'static str,
pub item: &'static str,
pub boolean: &'static str,
pub number: &'static str,
pub quoted: &'static str,
pub escaped: &'static str,
}
Expand description
A structure representing an ANSI color scheme used by DebugAnsiColored
formatter.
§Examples
unwind_context::set_default_color_scheme(&unwind_context::AnsiColorScheme {
default: "\u{1b}[0m",
location: "\u{1b}[31m",
fn_keyword: "\u{1b}[32m",
func_name: "\u{1b}[33m",
func_braces: "\u{1b}[34m",
value_braces: "\u{1b}[35m",
ident: "\u{1b}[36m",
item: "\u{1b}[37m",
boolean: "\u{1b}[91m",
number: "\u{1b}[92m",
quoted: "\u{1b}[93m",
escaped: "\u{1b}[94m",
});
Fields§
§default: &'static str
The ANSI escape sequence used for default text styling.
location: &'static str
The ANSI escape sequence used before code location.
fn_keyword: &'static str
The ANSI escape sequence used before fn
keyword.
func_name: &'static str
The ANSI escape sequence used before function name.
func_braces: &'static str
The ANSI escape sequence used before function braces.
value_braces: &'static str
The ANSI escape sequence used before any value braces.
ident: &'static str
The ANSI escape sequence used before identifiers.
item: &'static str
The ANSI escape sequence used before struct, enum and const names.
boolean: &'static str
The ANSI escape sequence used before false
or true
keywords.
number: &'static str
The ANSI escape sequence used before numbers.
quoted: &'static str
The ANSI escape sequence used before quoted strings.
escaped: &'static str
The ANSI escape sequence used before escaped characters in quoted strings.
Trait Implementations§
source§impl Clone for AnsiColorScheme
impl Clone for AnsiColorScheme
source§fn clone(&self) -> AnsiColorScheme
fn clone(&self) -> AnsiColorScheme
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnsiColorScheme
impl Debug for AnsiColorScheme
source§impl Hash for AnsiColorScheme
impl Hash for AnsiColorScheme
source§impl Ord for AnsiColorScheme
impl Ord for AnsiColorScheme
source§fn cmp(&self, other: &AnsiColorScheme) -> Ordering
fn cmp(&self, other: &AnsiColorScheme) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for AnsiColorScheme
impl PartialEq for AnsiColorScheme
source§fn eq(&self, other: &AnsiColorScheme) -> bool
fn eq(&self, other: &AnsiColorScheme) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AnsiColorScheme
impl PartialOrd for AnsiColorScheme
source§fn partial_cmp(&self, other: &AnsiColorScheme) -> Option<Ordering>
fn partial_cmp(&self, other: &AnsiColorScheme) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AnsiColorScheme
impl Eq for AnsiColorScheme
impl StructuralPartialEq for AnsiColorScheme
Auto Trait Implementations§
impl RefUnwindSafe for AnsiColorScheme
impl Send for AnsiColorScheme
impl Sync for AnsiColorScheme
impl Unpin for AnsiColorScheme
impl UnwindSafe for AnsiColorScheme
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