aboutsummaryrefslogtreecommitdiff
path: root/lockchain-http
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2018-06-09 22:26:38 +0200
committerKatharina Fey <kookie@spacekookie.de>2018-06-09 22:26:38 +0200
commitc541913c19467563ed55169f1756070b18fd43d4 (patch)
tree9b23b6c258b2056b3daabf0d0841427b8b97307c /lockchain-http
parent6e34f8294138db7efc5975d5af4a4d2e4cb101a9 (diff)
Tweaking the documentation for lockchain-http
Diffstat (limited to 'lockchain-http')
-rw-r--r--lockchain-http/src/lib.rs26
-rw-r--r--lockchain-http/src/model.rs10
2 files changed, 18 insertions, 18 deletions
diff --git a/lockchain-http/src/lib.rs b/lockchain-http/src/lib.rs
index 2a640c3..5192de2 100644
--- a/lockchain-http/src/lib.rs
+++ b/lockchain-http/src/lib.rs
@@ -1,15 +1,15 @@
-// //! A plug and play http interface layer for various lockchain components
-// //!
-// //! The way this is done is by shimming a common REST interface (via actix-web) in
-// //! between common `lockchain-core` types and the `lockchain-client` library which
-// //! is a base wrapper around `reqwest` which uses this API.
-// //!
-// //! You can of course also use whatever other library, in whatever language you want
-// //! to access this API. Doing so via the *official* client gives you the ability to
-// //! negotiate version numbers and have more advanced error handling built-in.
-// //!
-// //! Ideally this shim-layer version should be the same as the `lockchain-core` it binds
-// //! against, however especially during development this won't always be the case.
+//! A plug and play http interface layer for various lockchain components
+//!
+//! The way this is done is by shimming a common REST interface (via actix-web) in
+//! between common `lockchain-core` types and the `lockchain-client` library which
+//! is a base wrapper around `reqwest` which uses this API.
+//!
+//! You can of course also use whatever other library, in whatever language you want
+//! to access this API. Doing so via the *official* client gives you the ability to
+//! negotiate version numbers and have more advanced error handling built-in.
+//!
+//! Ideally this shim-layer version should be the same as the `lockchain-core` it binds
+//! against, however especially during development this won't always be the case.
#[macro_use]
extern crate serde_derive;
@@ -21,7 +21,7 @@ extern crate lockchain_core as lockchain;
mod handlers;
mod model;
-// pub use model::CarrierMessage;
+pub use model::CarrierMessage;
use actix_web::{server, App};
use lockchain::traits::{Body, Vault};
diff --git a/lockchain-http/src/model.rs b/lockchain-http/src/model.rs
index bd8b6c1..c775ee6 100644
--- a/lockchain-http/src/model.rs
+++ b/lockchain-http/src/model.rs
@@ -1,10 +1,10 @@
-//! API data models
+//! Data models specific to the lockchain API
use lockchain::errors::Error as LockError;
-use serde::{Serialize, de::DeserializeOwned};
+use serde::{de::DeserializeOwned, Serialize};
-/// A generic container that json wraps lockchain-types
-///
+/// A generic container that json/error wraps lockchain-types
+///
/// This is heavily used in the lockchain-REST API and can be utilised
/// to send both encrypted and cleartext data via the API endpoint, using
/// the same code.
@@ -13,4 +13,4 @@ pub struct CarrierMessage<T: Serialize + DeserializeOwned> {
pub error: Result<(), LockError>,
#[serde(bound(deserialize = "T: Serialize + DeserializeOwned"))]
pub data: Option<T>,
-} \ No newline at end of file
+}