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§

Type Aliases§