The trait currently reports a char at a time. While terminal emulators might need to operate on chars, other tools like stripping of ANSI escape codes or converting them, need to work on slices
&str -> char conversion is expensive, relatively speaking
- doing IO per
char would be expensive
- allocating a
String to aggregate the chars would also be expensive
To workaround this, anstream exposed the state changes from its fork, anstyle-parse, to do this.
The trait currently reports a
charat a time. While terminal emulators might need to operate onchars, other tools like stripping of ANSI escape codes or converting them, need to work on slices&str->charconversion is expensive, relatively speakingcharwould be expensiveStringto aggregate thechars would also be expensiveTo workaround this,
anstreamexposed the state changes from its fork,anstyle-parse, to do this.