[][src]Crate atomic_lib

atomic_lib helps you to get, store, serialize, parse and validate Atomic Data.

The Store contains most of the logic that you need.

Getting started

// Let's parse this AD3 string
let string = String::from("[\"_:test\",\"https://atomicdata.dev/properties/shortname\",\"Test\"]");
// Start with initializing our store
let mut store = atomic_lib::Store::init();
// Run parse...
store.parse_ad3(&string).unwrap();
// Get our resource...
let my_resource = store.get(&"_:test".into()).unwrap();
// Get our value by filtering on our property...
let my_value = my_resource.get("https://atomicdata.dev/properties/shortname").unwrap();
println!("My value: {}", my_value);
assert!(my_value == "Test")

Re-exports

pub use store::Store;
pub use atoms::Atom;

Modules

atoms
errors
mapping

Mappings

mutations
serialize
store

Store - this is an in-memory store of Atomic data. This provides many methods for finding, changing, serializing and parsing Atomic Data. Currently, it can only persist its data as .ad3 (Atomic Data Triples) to disk. A more robust persistent storage option will be used later, such as: https://github.com/TheNeikos/rustbreak

urls

Contains some of the most important Atomic Data URLs.