aboutsummaryrefslogtreecommitdiff
path: root/lockchain-core/README.md
diff options
context:
space:
mode:
authorKatharina Sabel <katharina.sabel@asquera.de>2018-05-07 16:10:54 +0200
committerKatharina Sabel <katharina.sabel@asquera.de>2018-05-07 16:10:54 +0200
commitb506e5968cc257f256a36064a309b4c2f19e37ab (patch)
treeefe78196b73fd8eb1983b8fc57a3cb8e4913ea06 /lockchain-core/README.md
parentcb7612ae9e1bcea664f3e320c7e5ba0cc95cffa0 (diff)
Fleshing out basic traits provided by lockchain-core
Diffstat (limited to 'lockchain-core/README.md')
-rw-r--r--lockchain-core/README.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/lockchain-core/README.md b/lockchain-core/README.md
index cdb78c5..cdb20ad 100644
--- a/lockchain-core/README.md
+++ b/lockchain-core/README.md
@@ -12,13 +12,13 @@ The core types provided by this crate are
- `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).
+The last one is a trait that provides a few shared functions for backend implementations. Some might want to only keep encrypted data around while others could selectively query different fields. Some have more advanced versioning, some don't, etc. 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;
+use lockchain::traits::{Body, Encryption};
#[derive(Serialize, Deserialize)]
struct EncryptedBody {
@@ -26,19 +26,22 @@ struct EncryptedBody {
}
impl Body for EncryptedBody {
- type Impl = Self;
// ... function implementations ...
}
+
+impl Encryption for EncryptedBody {
+ // ... implement the functions ...
+}
```
## License
-`barrel` is free software: you can redistribute it and/or modify it under the terms of the MIT Public License.
+`lockchain` 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).
+In the interest of fostering an open and welcoming environment, the `lockchain` 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).