completeio 0.1.0

Completion based IO drivers and async runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use completeio::fs::OpenOptions;

fn main() {
    let buffer = completeio::task::block_on(async {
        let file = OpenOptions::new().read(true).open("Cargo.toml").unwrap();
        let (read, buffer) = file.read_to_end_at(Vec::with_capacity(4096), 0).await;
        let read = read.unwrap();
        assert_eq!(read, buffer.len());
        String::from_utf8(buffer).unwrap()
    });
    println!("{}", buffer);
}