[−][src]Crate structsy
Simple single file struct persistence manger
Example
use structsy::{Structsy, StructsyError, StructsyTx}; use structsy_derive::Persistent; #[derive(Persistent)] struct MyData { name: String, address: String, } // ...... let db = Structsy::open("my_data.db")?; db.define::<MyData>()?; let my_data = MyData { name: "Structsy".to_string(), address: "https://gitlab.com/tglman/structsy".to_string(), }; let mut tx = db.begin()?; tx.insert(&my_data)?; tx.commit()?;
Re-exports
pub use internal::Persistent; |
Modules
internal | Internal APIs used by the generated code to interact with structsy, not for public use |
Structs
EmbeddedFilter | Filter for an embedded structure |
OwnedSytx | Owned transation to use with |
RangeIterator | Iterator implementation for Range of indexed persistent types |
Ref | Reference to a record, can be used to load a record or to refer a record from another one. |
RefSytx | Reference transaction to use with |
Structsy | Main API to persist structs with structsy. |
StructsyConfig | Configuration builder for open/create a Structsy file. |
StructsyIter | Iterator for query results |
StructsyQuery | Query for a persistent struct |
StructsyQueryTx | Query for a persistent struct considering in transaction changes. |
UniqueRangeIterator | Iterator implementation for Range of unique indexed persistent types |
Enums
StructsyError | |
ValueMode | Define the behavior of the index in case a key value pair already exists |
Traits
Operators | And/Or/Not Operators |
PersistentEmbedded | Base trait implemented by all types that can be persisted inside a struct. |
StructsyTx | Transaction behaviour trait. |
Sytx |
Type Definitions
SRes |