Expand description
Export/Import Persy storage data to a external structure.
§Supported format:
§Custom
Hust extract/import the data through defined structs and use a custom write/read
Functions:
export, import.
§JSON
export/import to a JSON serialized Read/Write
Functions:
export_json, import_json.
§Examples
§Custom Export Example
use persy::{Persy, Config};
use persy_expimp::export;
use std::vec::Vec;
let persy = Persy::open("file.persy", Config::new())?;
for info in export(&persy)? {
// Custom logic
}§Custom Import Example
use persy::{Persy, Config};
use persy_expimp::{import,Info};
Persy::create("imported.persy")?;
let persy = Persy::open("imported.persy", Config::new())?;
// Source informations from a custom source
let source = Vec::<Info>::new();
import(&persy,source.into_iter())?;Structs§
Enums§
Traits§
Functions§
- export
- Export the data from a persy storage with a custom format
- export_
binary - export_
binary_ from_ snapshot - export_
from_ snapshot - Export the data from a snapshot of persy storage with a custom format
- export_
json - Export the data from a persy storage with using JSON format
- export_
json_ from_ snapshot - Export the data from a persy storage with using JSON format
- import
- Import the data to a persy storage from a custom format
- import_
binary - import_
json - Import data to a persy storage reading JSON export
- import_
with_ handler - Import the data to a persy storage from a custom format