aboutsummaryrefslogtreecommitdiff
path: root/lockchain-core/README.md
diff options
context:
space:
mode:
authorKatharina Sabel <katharina.sabel@asquera.de>2018-05-07 15:39:42 +0200
committerKatharina Sabel <katharina.sabel@asquera.de>2018-05-07 15:39:42 +0200
commitcb7612ae9e1bcea664f3e320c7e5ba0cc95cffa0 (patch)
tree179e72b468fa1f2087b3819a43527da44731ced0 /lockchain-core/README.md
parent20daf15721dc5e34387f49fe000d37bc4fcd0574 (diff)
Working on lockchain-core exposed types
Diffstat (limited to 'lockchain-core/README.md')
-rw-r--r--lockchain-core/README.md43
1 files changed, 42 insertions, 1 deletions
diff --git a/lockchain-core/README.md b/lockchain-core/README.md
index 006040c..cdb78c5 100644
--- a/lockchain-core/README.md
+++ b/lockchain-core/README.md
@@ -1,3 +1,44 @@
# lockchain-core
-Contains common types used in the `lockchain` ecosystem. Exposes serde serialisable types that can be embedded into various applications. \ No newline at end of file
+Library of common types used in the `lockchain` crate ecosystem. It exposes traits and serde-compatible generic types that are meant to be embedded into various applications. Also provides stubbed functions with `unimplemented!()` macros to allow rapid prototyping or selective feature implementations.
+
+The documentation isn't complete, if you have questions how to use it don't hesitate to open an issue. And docs PR's always welcome 💚.
+
+## How to use
+
+The core types provided by this crate are
+
+- `Vault<T>`
+- `Record<T>`
+- `Body`
+
+The last one is a trait with an associated type `Impl` which should be `Self`. This then leaves feature implementations (encrypted data, clear-text data, etc) open to the user (you 😆). Additionally we have more types to round out a vault (`Payload`, `Header`, etc).
+
+A simple implementation of a body type could look like this.
+
+```rust
+extern crate lockchain_core as lockchain;
+use lockchain::traits::Body;
+
+#[derive(Serialize, Deserialize)]
+struct EncryptedBody {
+ // ... your fields here ...
+}
+
+impl Body for EncryptedBody {
+ type Impl = Self;
+
+ // ... function implementations ...
+}
+```
+
+## License
+
+`barrel` is free software: you can redistribute it and/or modify it under the terms of the MIT Public License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MIT Public License for more details.
+
+
+## Conduct
+
+In the interest of fostering an open and welcoming environment, the `barrel` project pledges to making participation a harassment-free experience for everyone. See [Code of Conduct](../code_of_conduct.md) for details. In case of violations, e-mail [kookie@spacekookie.de](mailto:kookie@spacekookie.de).