[][src]Crate persy_expimp

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
Record
SegmentMetadata

Enums

Error
IndexKey
IndexValue
Info

Functions

export

Export the data from a persy storage with a custom format

import

Import the data to a persy storage from a custom format

Type Definitions

EIRes