pub fn enable_ansi_support() -> Result<(), ()>
Expand description

Enable ANSI support (on Windows).

On Windows, the terminal needs to be put into an “ANSI mode” so that it will render colors. This is not enabled by default, but this function will enable it for you.

The function is also available on other platforms, but is a no-op in this case. So you can call this function in any case.

You can also directly call the function yansi::Paint::enable_windows_ascii, or use any other means of enabling the virtual ANSI console in Windows. Maybe some other part of your application already does that.