Module cansi::v3

source ·
Expand description

Update API for version 3.0 of the crate.

To start using v3, import the items with cansi::v3::*. This way, moving to version 3.0 will only require a change in import code. Note that version 3.0 will remove the deprecated version 2.0 items.

Re-exports

pub use crate::Color;
pub use crate::Intensity;

Structs

An iterator structure for CategorisedSlices, iterating over each new line (\n or \r\n) and returns the categorised slices within those. CategorisedSlices that include a new line are split with the same style.
Data structure that holds information about colouring and styling of a text slice.

Functions

Parses the text and returns each formatted slice in order. The ANSI escape codes are not included in the text slices.
Constructs a string of the categorised text without the ANSI escape characters.
Construct an iterator over each new line (\n or \r\n) and returns the categorised slices within those. CategorisedSlices that include a new line are split with the same style.

Type Definitions

The item type of CategorisedLineIterator.
Type definition of the collection of CategorisedSlices.