diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 00:33:33 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 00:33:36 -0700 |
commit | 33a4cce0b97832f5f0301b318a0a50073ce6b615 (patch) | |
tree | 1b6ba7ec5944d2be2d746510e743a7934f453cd0 /rust/src/api_lib.rs | |
parent | 4a1d8f20ab91fda0f4794131144915d0c5214268 (diff) | |
download | fatcat-33a4cce0b97832f5f0301b318a0a50073ce6b615.tar.gz fatcat-33a4cce0b97832f5f0301b318a0a50073ce6b615.zip |
revert to v2.3.1 codegen
This reverts back to something compatible with Iron and simple
(blocking) parallelism, instead of the new async hyper 0.11 stuff.
Diffstat (limited to 'rust/src/api_lib.rs')
-rw-r--r-- | rust/src/api_lib.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/rust/src/api_lib.rs b/rust/src/api_lib.rs deleted file mode 100644 index cc8c2313..00000000 --- a/rust/src/api_lib.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! Main library entry point for fatcat implementation. - -// Imports required by server library. -// extern crate fatcat; -// extern crate swagger; -extern crate futures; -extern crate chrono; -#[macro_use] -extern crate error_chain; - -mod server; - -mod errors { - error_chain!{} -} - -pub use self::errors::*; -use std::io; -use hyper; -use fatcat; - -pub struct NewService; - -impl hyper::server::NewService for NewService { - type Request = (hyper::Request, fatcat::Context); - type Response = hyper::Response; - type Error = hyper::Error; - type Instance = fatcat::server::Service<server::Server>; - - /// Instantiate a new server. - fn new_service(&self) -> io::Result<Self::Instance> { - Ok(fatcat::server::Service::new(server::Server)) - } -} |