ansiconst 0.2.1

Library for declaring nestable ANSI styles in const context
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Ansi;

#[derive(PartialEq, Eq, Clone, Copy)]
pub(super) struct AnsiNode {
    pub(super) ansi: Ansi,
    pub(super) number_of_inner_ansis: u8,
}

impl AnsiNode {
    pub(super) const PLACEHOLDER: &'static str = "\x1B[?m";

    #[inline]
    pub(super) fn new(ansi: Ansi) -> Self { Self { ansi, number_of_inner_ansis: 0 } }
}