Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rust-si

> 编程语言
Open source

a rusty `scanf` (`scan!`) and inverse of `print!` (`read!`)

197 stars0 likes2 views
WebsiteGitHub

About

a rusty `scanf` (`scan!`) and inverse of `print!` (`read!`)

You can use either the read! macro to read a single value and return it, or the scan! macro to read one or more values into variables. Both macros can also read from a file or from memory. The read! macro can take any type that implements Iterator as an optional third argument, and the scan! macro's arguments can be prefixed with iter => where iter implements Iterator.

Examples

scan! macro

rust
use text_io::scan;

// reading from a string source
let i: i32;
scan!("12".bytes() => "{}", i);
assert_eq!(i, 12);

// reading multiple values from stdio
let a: i32;
let b: &mut u8 = &mut 5;
scan!("{}, {}", a, *b);

read! macro

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustiomacrosrustscan

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言