3 个不稳定版本

0.2.0 2024年6月23日
0.1.1 2021年8月6日
0.1.0 2016年11月1日

109命令行界面

Download history · Rust 包仓库 2807/week @ 2024-05-03 · Rust 包仓库 3112/week @ 2024-05-10 · Rust 包仓库 3596/week @ 2024-05-17 · Rust 包仓库 3562/week @ 2024-05-24 · Rust 包仓库 3314/week @ 2024-05-31 · Rust 包仓库 3703/week @ 2024-06-07 · Rust 包仓库 5365/week @ 2024-06-14 · Rust 包仓库 4732/week @ 2024-06-21 · Rust 包仓库 3842/week @ 2024-06-28 · Rust 包仓库 3725/week @ 2024-07-05 · Rust 包仓库 4355/week @ 2024-07-12 · Rust 包仓库 4463/week @ 2024-07-19 · Rust 包仓库 4847/week @ 2024-07-26 · Rust 包仓库 4509/week @ 2024-08-02 · Rust 包仓库 4514/week @ 2024-08-09 · Rust 包仓库 6157/week @ 2024-08-16 · Rust 包仓库

20,957 每月下载量
用于 20 个 Crates (12 直接使用)

MIT 许可证

10KB
141

ANSI 转义码

用于操作终端的 ANSI 转义码

用法

此示例程序将打印 "Hello, World!",然后在 1 秒后将它替换为 "Hello, Terminal!"。

extern crate ansi_escapes;

use std::thread::sleep;
use std::time::Duration;

fn main() {
    // Hides the cursor
    print!("{}", ansi_escapes::CursorHide);

    // Prints first message
    println!("Hello, World!");

    // Waits one seconds
    sleep(Duration::from_secs(1));

    // Erases the two lines
    print!("{}", ansi_escapes::EraseLines(2));

    // Print final message
    println!("Hello, Terminal!");

    // Shows the cursor
    print!("{}", ansi_escapes::CursorShow);
}

API

请参阅 文档

无运行时依赖