1个不稳定版本
使用旧的Rust 2015
0.1.1 | 2018年7月10日 |
---|---|
0.1.0 |
|
#13 in #搜索
68 每月下载量
12KB
240 行
resa 
Rust API,用于在特定平台(如StackOverflow)上搜索错误。主要目的是减少在特定平台搜索问题的时间。
安装
在您的Cargo.toml
中应用更改
[dependencies]
resa = "0.1.0"
或者使用以下命令安装二进制文件
cargo install resa
API示例使用
extern crate resa;
use resa::*;
fn main(){
let mut s: StackOverflow = StackOverflow::search("Compiler Error")
.filter(3);
for issues in s.items{
println!("(:?)", issues);
}
}
lib.rs
:
通用
一个用于错误搜索的Rust编写的REST搜索API。
示例使用
使用StackOverflow REST API的此crate的示例使用方法
extern crate resa;
use resa::*;
let result = resa::stackoverflow::StackOverflow::search("Compiler Error");
测试
使用以下示例尝试API的二进制文件resa
fn main() {
let v = vec![1, 2, 3];
let v2 = v;
println!("v[0] is: {}", v[0]);
const C: i32 = 2;
static CONST_REF: &'static mut i32 = &mut C;
}
resa -f -r 3 fail.rs
依赖项
~17–28MB
~485K SLoC