diff options
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)) - } -} |