From c541913c19467563ed55169f1756070b18fd43d4 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 9 Jun 2018 22:26:38 +0200 Subject: Tweaking the documentation for lockchain-http --- lockchain-http/src/lib.rs | 26 +++++++++++++------------- lockchain-http/src/model.rs | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'lockchain-http') 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 { pub error: Result<(), LockError>, #[serde(bound(deserialize = "T: Serialize + DeserializeOwned"))] pub data: Option, -} \ No newline at end of file +} -- cgit v1.2.3