1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # tempfile-fast
//!
//! (Slightly) faster temporary files on Linux.
//!
//! ## Sponge
//!
//! A [`Sponge`] is a safe and efficient way to update a file in place.
//!
//! ### Example
//!
//! ```rust
//! # use std::io::Write;
//! let mut temp = tempfile_fast::Sponge::new_for("example.txt").unwrap();
//! temp.write_all(b"hello").unwrap();
//! temp.commit().unwrap();
//! ```
//!
//! ## PersistableTempFile
//!
//! The raw [`PersistableTempFile`] is also available. However,
//! You probably want to use the [`tempfile`] crate unless you have
//! hit a known performance problem, or you only care about modern
//! Linux. See [`README.md`] for more details.
//!
//! ### Example (raw)
//!
//! ```rust,no_run
//! # use std::io::Write;
//! let mut temp = tempfile_fast::PersistableTempFile::new_in("/var/lib/foo").unwrap();
//! temp.write_all(b"hello").unwrap();
//! temp.persist_noclobber("/var/lib/foo/bar").unwrap();
//! ```
//!
//! [`Sponge`]: struct.Sponge.html
//! [`PersistableTempFile`]: enum.PersistableTempFile.html
//! [`tempfile`]: https://crates.io/crates/tempfile
//! [`README.md`]: https://github.com/FauxFaux/tempfile-fast-rs/blob/master/README.md
pub use cratePersistError;
pub use cratePersistableTempFile;
pub use Sponge;