Crate persy_expimp
source ·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 the data from a persy storage with a custom format
Export the data from a snapshot of persy storage with a custom format
Export the data from a persy storage with using JSON format
Export the data from a persy storage with using JSON format
Import the data to a persy storage from a custom format
Import data to a persy storage reading JSON export
Import the data to a persy storage from a custom format