Crate structsy[][src]

Expand description

Simple single file struct persistence manger


use structsy::{Structsy, StructsyError, StructsyTx};
use structsy_derive::Persistent;
struct MyData {
    name: String,
    address: String,
// ......
let db = Structsy::open("my_data.db")?;

 let my_data = MyData {
   name: "Structsy".to_string(),
   address: "".to_string(),
let mut tx = db.begin()?;


pub use internal::Persistent;


Internal APIs used by the generated code to interact with structsy, not for public use

Raw access structures


Generic filter for any Persistent structures

Owned transation to use with StructsyTx trait

Prepare open of a structsy file, with migrations possibilities

Transaction prepared state ready to be committed if the second phase is considered successful

Iterator implementation for Range of indexed persistent types

Iterator of raw Records

Prepared state of RawTransaction

Transaction for save data in a structsy database without the original source code

Reference to a record, can be used to load a record or to refer a record from another one.

Reference transaction to use with StructsyTx trait

Read data from a snapshot freezed in a specific moment ignoring all the subsequent committed transactions.

A query to be executed on a specific snapshot

Main API to persist structs with structsy.

Configuration builder for open/create a Structsy file.

Iterator for query results

Query for a persistent struct

Query for a persistent struct considering in transaction changes.

Iterator implementation for Range of unique indexed persistent types


Query ordering

All the possible Structsy errors

Define the behavior of the index in case a key value pair already exists


Execute a query on structsy or a structsy transaction


And/Or/Not Operators

Base trait implemented by all types that can be persisted inside a struct.

Trait for data operations that do not require original structs and enums source code.

Transaction behaviour trait.

Type Definitions