Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BurntSushi/termcolor
/ functions
Functions
78 in github.com/BurntSushi/termcolor
⨍
Functions
78
◇
Types & classes
26
↓ 4 callers
Method
len
Returns the length of this buffer in bytes.
src/lib.rs:967
↓ 4 callers
Method
lock
(&self)
src/lib.rs:251
↓ 3 callers
Method
flush
(&mut self)
src/lib.rs:281
↓ 3 callers
Method
handle
(&self)
wincolor/src/win.rs:44
↓ 3 callers
Method
push
Push the given color specification into this buffer. This has the effect of setting the given color information at the current position in the buffer
src/lib.rs:1341
↓ 3 callers
Method
set
Applies the current text attributes.
wincolor/src/win.rs:80
↓ 3 callers
Method
write_color
( &mut self, fg: bool, c: &Color, intense: bool, )
src/lib.rs:1189
↓ 2 callers
Method
get_ref
Return a reference to the inner writer.
src/lib.rs:1091
↓ 2 callers
Method
reset
(&mut self)
src/lib.rs:127
↓ 2 callers
Method
should_ansi
(&self)
src/lib.rs:195
↓ 2 callers
Method
should_attempt_color
(&self)
src/lib.rs:160
↓ 2 callers
Method
to_fg
(&self)
wincolor/src/win.rs:197
↓ 2 callers
Method
wrap
(&self, wtr: Q)
src/lib.rs:1762
↓ 2 callers
Method
write_console
( &self, console: &mut wincolor::Console, )
src/lib.rs:1510
↓ 2 callers
Method
write_str
(&mut self, s: &str)
src/lib.rs:1185
↓ 1 callers
Method
bg
Get the background color.
src/lib.rs:1437
↓ 1 callers
Method
fg
Get the foreground color.
src/lib.rs:1428
↓ 1 callers
Method
is_empty
Returns true if and only if this buffer is empty.
src/lib.rs:962
↓ 1 callers
Method
is_synchronous
(&self)
src/lib.rs:128
↓ 1 callers
Method
set_virtual_terminal_processing
Toggle virtual terminal processing. This method attempts to toggle virtual terminal processing for this console. If there was a problem toggling it,
wincolor/src/win.rs:130
↓ 1 callers
Method
to_bg
(&self)
wincolor/src/win.rs:189
↓ 1 callers
Method
to_windows
( self, intense: bool, )
src/lib.rs:1567
↓ 1 callers
Method
to_word
(&self)
wincolor/src/win.rs:161
↓ 1 callers
Method
write
(&mut self, b: &[u8])
src/lib.rs:271
↓ 1 callers
Function
write_lossy_utf8
(mut w: W, buf: &[u8])
src/lib.rs:1806
Method
ansi
Create a buffer that uses ANSI escape sequences.
src/lib.rs:951
Method
as_mut_slice
Return the underlying data of the buffer as a mutable slice.
src/lib.rs:1010
Method
as_slice
Return the underlying data of the buffer.
src/lib.rs:1000
Function
assert_is_send
()
src/lib.rs:1823
Method
bg
Apply the given intensity and color attributes to the console background. If there was a problem setting attributes on the console, then an error is
wincolor/src/win.rs:103
Method
bold
Get whether this is bold or not. Note that the bold setting has no effect in a Windows console.
src/lib.rs:1448
Method
buffer
(&self)
src/lib.rs:840
Method
clear
Clears this buffer.
src/lib.rs:977
Method
console
()
src/lib.rs:957
Method
create
( sty: StandardStreamType, choice: ColorChoice, )
src/lib.rs:474
Method
create_for_stream
Get a console for a standard I/O stream.
wincolor/src/win.rs:54
Method
description
(&self)
src/lib.rs:1689
Method
fg
Apply the given intensity and color attributes to the console foreground. If there was a problem setting attributes on the console, then an error is
wincolor/src/win.rs:92
Method
fmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:1700
Method
from_bg
(word: WORD)
wincolor/src/win.rs:193
Method
from_fg
(word: WORD)
wincolor/src/win.rs:204
Method
from_str
(s: &str)
src/lib.rs:1726
Method
from_str_numeric
Parses a numeric color string, either ANSI or RGB.
src/lib.rs:1607
Method
from_stream
(stream: &StandardStream)
src/lib.rs:403
Method
from_word
(word: WORD)
wincolor/src/win.rs:170
Method
get_mut
Return a mutable reference to the inner writer.
src/lib.rs:1094
Method
intense
Get whether this is intense or not. On Unix-like systems, this will output the ANSI escape sequence that will print a high-intensity version of the c
src/lib.rs:1479
Method
into_inner
Consume this buffer and return the underlying raw data. On Windows, this unrecoverably drops all color information associated with the buffer.
src/lib.rs:990
Method
invalid
Return the string that couldn't be parsed as a valid color.
src/lib.rs:1685
Method
is_none
Returns true if this color specification has no colors or styles.
src/lib.rs:1495
Method
is_synchronous
Returns true if and only if the underlying writer must synchronously interact with an end user's device in order to control colors. By default, this a
src/lib.rs:117
Method
new
(sty: StandardStreamType)
src/lib.rs:232
Method
no_color
Create a buffer that drops all color information.
src/lib.rs:946
Method
parse_number
(s: &str)
src/lib.rs:1614
Method
print
Prints the contents of the given buffer. It is safe to call this from multiple threads simultaneously. In particular, all buffers are written atomica
src/lib.rs:858
Method
reset
Reset the console text attributes to their original settings. The original settings correspond to the text attributes on the console when this `Conso
wincolor/src/win.rs:116
Method
separator
If set, the separator given is printed between buffers. By default, no separator is printed. The default value is `None`.
src/lib.rs:831
Method
set_bg
Set the background color.
src/lib.rs:1440
Method
set_bold
Set whether the text is bolded or not. Note that the bold setting has no effect in a Windows console.
src/lib.rs:1453
Method
set_color
(&mut self, spec: &ColorSpec)
src/lib.rs:124
Method
set_fg
Set the foreground color.
src/lib.rs:1431
Method
set_intense
Set whether the text is intense or not. On Unix-like systems, this will output the ANSI escape sequence that will print a high-intensity version of t
src/lib.rs:1489
Method
set_underline
Set whether the text is underlined or not. Note that the underline setting has no effect in a Windows console.
src/lib.rs:1466
Function
standard_stream_is_send
()
src/lib.rs:1826
Method
stderr
Create a new `StandardStream` with the given color preferences that writes to standard error. On Windows, if coloring is desired and a Windows consol
src/lib.rs:384
Method
stderr
Create a new Console to stderr. If there was a problem creating the console, then an error is returned.
wincolor/src/win.rs:75
Method
stdout
Create a new `StandardStream` with the given color preferences that writes to standard output. On Windows, if coloring is desired and a Windows conso
src/lib.rs:371
Method
stdout
Create a new Console to stdout. If there was a problem creating the console, then an error is returned.
wincolor/src/win.rs:68
Method
supports_color
(&self)
src/lib.rs:123
Function
test_256_parse_err_out_of_range
()
src/lib.rs:1849
Function
test_256_parse_ok
()
src/lib.rs:1837
Function
test_rgb_parse_err_bad_format
()
src/lib.rs:1882
Function
test_rgb_parse_err_out_of_range
()
src/lib.rs:1873
Function
test_rgb_parse_ok
()
src/lib.rs:1858
Function
test_simple_parse_ok
()
src/lib.rs:1831
Function
test_var_ansi_write_256
()
src/lib.rs:1904
Function
test_var_ansi_write_rgb
()
src/lib.rs:1897
Method
underline
Get whether this is underline or not. Note that the underline setting has no effect in a Windows console.
src/lib.rs:1461