alexcrichton / alexcrichton/curl-rust
one of your examples doesnt work
- Ngôn ngữ chính
- Rust
- Star
- 1.1k
- Fork
- 258
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
```rs
use curl::easy::Easy;
// Capture output into a local `Vec`.
fn main() {
let mut dst = Vec::new();
let mut easy = Easy::new();
easy.url("https://www.rust-lang.org/").unwrap();
let mut transfer = easy.transfer();
transfer.write_function(|data| {
dst.extend_from_slice(data);
Ok(data.len())
}).unwrap();
transfer.perform().unwrap();
println!("{:?}", dst);
}
```
ive added that last println! line as a basic way to show theres no way to access the data after its written to, unless im missing something fundamental about closures
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.