diff --git a/README.md b/README.md index 9cfbd1f..c225aeb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Features - Simple To Use, Fast, Secure - Threadsafe - Key/Value Storage +- bincode or yaml storage Usage ----- @@ -55,6 +56,21 @@ fn main() { } ``` +### Yaml + +If you would like to use yaml instead of bincode to perhaps read or modify the +database in an editor you can use it like this: + +- Disable default features +- Specify yaml as a feature + +```toml +[dependencies.rustbreak] +version = "1" +default-features = false +features = ["yaml"] +``` + How it works ------------ diff --git a/examples/full.rs b/examples/full.rs index f99aa7f..8e0743c 100644 --- a/examples/full.rs +++ b/examples/full.rs @@ -41,4 +41,6 @@ fn main() { for al in get_albums("The Queenstons").unwrap() { println!("{}", al); } + + DB.flush().unwrap(); } diff --git a/src/lib.rs b/src/lib.rs index 8bbbec8..8df2eeb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ //! # Rustbreak //! //! Rustbreak is an [Daybreak][daybreak] inspiried single file Database. -//! It uses [bincode][bincode] to compactly save data. +//! It uses [bincode][bincode] or yaml to compactly save data. //! It is thread safe and very fast due to staying in memory until flushed to disk. //! //! It can be used for short-lived processes or with long-lived ones: