Crate persy_expimp

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§

Entry
IndexMetadata
Mapper
Record
SegmentMetadata

Enums§

Error
IndexKey
IndexValue
Info

Traits§

Handler
PersyReader

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

Type Aliases§

EIRes