This action will force synchronization from ShirDon-廖显东/RustTerm, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
当Rust语言的终端库只为UNIX系统编写时,您是否曾感到失望?
rustterm提供了清除、输入处理、样式设置、光标移动和终端操作
Windows和UNIX系统。
rusterm的目标是简单且易于调用代码。通过rustterm的简单性,您不必
担心你工作的平台。
这个机箱支持所有的UNIX和Windows终端,直到Windows7(不是所有的终端都经过测试, 查看 Tested Terminals 获取更多信息).
Tips:作者《Go Web编程实战派》出版了,促销活动中,想学Go Web编程的朋友,欢迎京东当当购买! 当当(🔥🔥🔥🔥🔥🔥 活动抢购中......):http://product.dangdang.com/29225055.html 京东(🔥🔥🔥🔥🔥🔥 活动抢购中......):https://item.jd.com/13200972.html
这个机箱支持所有UNIX终端和Windows终端,直到Windows 7;但是,并不是所有的
终端已经过测试。如果您已将此库用于除上述列表之外的终端
问题,然后请随意添加到上面的列表-我真的很感激!
[dependencies]
rustterm = "0.13"
use std::io::{stdout, Write};
use rustterm::{execute, ExecutableCommand, style::{Attribute, Color, SetForegroundColor, SetBackgroundColor, ResetColor}, Output, Result};
fn main() -> Result<()> {
// 调用 macro
execute!(
stdout(),
SetForegroundColor(Color::Blue),
SetBackgroundColor(Color::Red),
Output("Styled text here."),
ResetColor
)?;
// 或者调用方法
stdout()
.execute(SetForegroundColor(Color::Blue))?
.execute(SetBackgroundColor(Color::Red))?
.execute(Output("Styled text here."))?
.execute(ResetColor)?;
Ok(())
}
默认情况下启用所有功能。您可以禁用默认功能并仅启用其中一些功能。
[dependencies.rustterm]
version = "0.12"
default-features = false # Disable default features
features = ["cursor", "screen"] # Enable required features only
Feature | Description |
---|---|
input |
Sync/Async input readers |
cursor |
Cursor manipulation |
screen |
Alternate screen & raw mode |
terminal |
Size, clear, scroll |
style |
Colors, text attributes |
这个项目,rusterm
和它的所有子板条箱:rusterm_screen
,rusterm_cursor
,rusterm_style
,
rusterm_input
、rusterm_terminal
、rusterm_winapi
、rusterm_utils
是MIT
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。