| /// An example how to create custom ANSI sequences. |
| use anes::{csi, esc, sequence}; |
| fn static_unit_struct() { |
| /// Documentation string is also supported. |
| struct Foo => csi!("foo") |
| assert_eq!(&format!("{}", Foo), "\x1B[foo"); |
| /// Documentation string is also supported. |
| |this, f| write!(f, esc!("{};{}"), this.0, this.1) |
| assert_eq!(&format!("{}", Foo(5, 10)), "\x1B5;10"); |
| /// Documentation string is also supported. |
| /// Documentation string is also supported. |
| /// Documentation string is also supported. |
| assert_eq!(&format!("{}", Foo::Bar), "\x1Bbar"); |
| assert_eq!(&format!("{}", Foo::Baz), "\x1B[baz"); |