tempfile 3.0.1

A library for managing temporary files and directories.
Documentation
extern crate tempfile;
use std::io::{Read, Seek, SeekFrom, Write};

#[test]
fn test_basic() {
    let mut tmpfile = tempfile::tempfile().unwrap();
    write!(tmpfile, "abcde").unwrap();
    tmpfile.seek(SeekFrom::Start(0)).unwrap();
    let mut buf = String::new();
    tmpfile.read_to_string(&mut buf).unwrap();
    assert_eq!("abcde", buf);
}