1 unstable release
Uses old Rust 2015
0.1.0 | Mar 3, 2015 |
---|
#686 in Memory management
4KB
73 lines
rust-mmslice
A Memory Mapped File Slice (read-only) for Rust.
Example
extern crate mmslice;
use std::fs::File;
use mmslice::MmapSlice;
fn main() {
if let Ok(file) = File::open("foo.txt") {
if let Ok(mmslice) = MmapSlice::new::<u8>(file, 3) {
let slice: &[u8] = mmslice.as_slice();
// ...
}
}
}