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
// #![deny(warnings, missing_docs)] // #![cfg_attr(test, feature(plugin))] // #![cfg_attr(test, plugin(clippy))] //! Continuously read,write to memory using random offsets and lengths. Adapted //! from //! [mafintosh/random-access-memory](https://github.com/mafintosh/random-access-memory). //! //! ## Usage //! ```rust,ignore //! extern crate random_access_memory as ram; //! //! let mut file = ram::Sync::new(); //! file.write(0, b"hello")?; //! file.write(5, b" world")?; //! let text = file.read(0, 11)?; //! assert_eq!(text, b"hello world"); //! ``` #[macro_use] extern crate failure; /// Synchronous implementation. mod sync; pub use sync::*;