File Linked - controlling objects linked directly to a file
This library provides a wrapper around objects and ties the data to a file. It uses serde and bincode currently for serializing and deserializing the files.
Examples
use *;
use ;
use fmt;
use ToString;
use PathBuf;
let test = Test ;
let file_path = from;
// Object is consumed and can only be interacted with through the FileLinked object
let mut linked_test = new?;
// You can obtain a readonly reference of the underlying data
assert_eq!;
// Whenever a mutable operation is performed, the changed data is rewritten to the file
linked_test.mutate?;
assert_eq!;
drop;
// You can also initialize an object from a file
let from_file = from_file?;
assert_eq!;
assert_eq!;
assert_eq!;
This library is still in development and missing some features and so may not be stable:
- Currently after any mutable operations the FileLinked object will rewrite the entire file
- Custom selection of serializers is not implemented, the serializer used is just bincode as of now